This commit is contained in:
2018-10-03 22:13:33 +02:00
parent a30d13392e
commit fed33b6281
10 changed files with 1133 additions and 0 deletions

View File

View 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

View 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):