20 lines
328 B
Python
20 lines
328 B
Python
"""
|
|
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
|