Create a parser context

This commit is contained in:
2025-06-13 15:23:59 +02:00
parent fdaeb25f73
commit 09d91dd1b6
3 changed files with 216 additions and 216 deletions

View File

@ -5,9 +5,10 @@ FROM SYSTEM IMPORT ADR;
FROM M2RTS IMPORT HALT, ExitOnHalt;
FROM Lexer IMPORT Lexer, lexer_destroy, lexer_initialize;
FROM Parser IMPORT Parser;
FROM Transpiler IMPORT transpile;
FROM CommandLineInterface IMPORT PCommandLine, parse_command_line;
FROM Parser IMPORT PAstModule, parse_module;
FROM Parser IMPORT PAstModule, parse;
VAR
command_line: PCommandLine;
@ -31,7 +32,7 @@ BEGIN
IF IsNoError(source_input) THEN
lexer_initialize(ADR(lexer), source_input);
ast_module := parse_module(ADR(lexer));
ast_module := parse(ADR(lexer));
transpile(ast_module, StdOut, command_line^.input);
lexer_destroy(ADR(lexer));