package visitor; import ast.Program; import ast.definition.classes.FuncDefinition; import ast.definition.classes.VarDefinition; import ast.expression.classes.*; import ast.statement.classes.*; import ast.type.RecordField; import ast.type.classes.*; public interface Visitor<TP, TR> { //PROGRAM TR visit(Program ast, TP param); //TYPE TR visit(VoidType ast, TP param); TR visit(RecordType ast, TP param); TR visit(IntType ast, TP param); TR visit(FunctionType ast, TP param); TR visit(ErrorType ast, TP param); TR visit(DoubleType ast, TP param); TR visit(CharType ast, TP param); TR visit(ArrayType ast, TP param); TR visit(RecordField ast, TP param); //STATEMENT TR visit(Assignment ast, TP param); TR visit(IfElse ast, TP param); TR visit(ReadStatement ast, TP param); TR visit(Return ast, TP param); TR visit(WhileLoop ast, TP param); TR visit(WriteStatement ast, TP param); //EXPRESSION TR visit(Arithmetic ast, TP param); TR visit(ArrayIndexing ast, TP param); TR visit(Cast ast, TP param); TR visit(CharLiteral ast, TP param); TR visit(Comparison ast, TP param); TR visit(DoubleLiteral ast, TP param); TR visit(FieldAccess ast, TP param); TR visit(FunctionInvocation ast, TP param); TR visit(IntLiteral ast, TP param); TR visit(Logical ast, TP param); TR visit(Negation ast, TP param); TR visit(UnaryMinus ast, TP param); TR visit(Variable ast, TP param); //DEFINITION TR visit(FuncDefinition ast, TP param); TR visit(VarDefinition ast, TP param); }