83 lines
1.8 KiB
Python
83 lines
1.8 KiB
Python
import xml.etree.ElementTree as ET
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
class GeneralUnparser(ABC):
|
|
@abstractmethod
|
|
def unparse(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_node(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_top_block(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_block(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_routine(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_argument(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_statement(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_expression(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_declaration(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_operator(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_unary(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_stream(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_assignment(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_conditional(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_loop(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_routine_call(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_return(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_literal(self, element_in: ET.Element):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def unparse_variable(self, element_in: ET.Element):
|
|
pass
|
|
|
|
|