Split the parser from the code generator

This commit is contained in:
2025-06-11 22:36:35 +02:00
parent 00e557686b
commit e3f094c8a5
7 changed files with 409 additions and 230 deletions

View File

@ -4,15 +4,15 @@ FROM FIO IMPORT File;
FROM Common IMPORT ShortString;
FROM Lexer IMPORT PLexer, Lexer;
FROM Parser IMPORT PAstModule;
TYPE
TranspilerContext = RECORD
input_name: ShortString;
output: File;
lexer: PLexer
output: File
END;
PTranspilerContext = POINTER TO TranspilerContext;
PROCEDURE transpile(lexer: PLexer; output: File; input_name: ShortString);
PROCEDURE transpile(ast_module: PAstModule; output: File; input_name: ShortString);
END Transpiler.