initial
This commit is contained in:
0
s_basic/code_segments/__init__.py
Normal file
0
s_basic/code_segments/__init__.py
Normal file
19
s_basic/code_segments/abc.py
Normal file
19
s_basic/code_segments/abc.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
This module provides abstract code segment classes.
|
||||
"""
|
||||
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
class AbstractCodeSegment(ABC):
|
||||
@abstractmethod
|
||||
def parse(self):
|
||||
pass
|
||||
|
||||
class AbstractNestingCodeSegment(AbstractCodeSegment):
|
||||
@abstractmethod
|
||||
def parse_children(self):
|
||||
pass
|
||||
@abstractmethod
|
||||
def parse_child(self):
|
||||
pass
|
12
s_basic/code_segments/statements.py
Normal file
12
s_basic/code_segments/statements.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""
|
||||
This module provides statement classes.
|
||||
"""
|
||||
|
||||
from .abc import AbstractCodeSegment
|
||||
|
||||
class VariableDefinitionStatement(AbstractCodeSegment):
|
||||
def __init__(self, parsing_context):
|
||||
self.parsing_context = parsing_context
|
||||
|
||||
def parse(self):
|
||||
|
Reference in New Issue
Block a user