Parse the variable part to AST

This commit is contained in:
2025-06-04 12:14:04 +02:00
parent 82f0d40a56
commit 7c12fc1364
5 changed files with 89 additions and 31 deletions

View File

@ -46,6 +46,8 @@ TYPE
PPAstTypeDeclaration = POINTER TO PAstTypeDeclaration;
AstVariableDeclaration = RECORD
variable_name: Identifier;
variable_type: PAstTypeExpression
END;
PAstVariableDeclaration = POINTER TO AstVariableDeclaration;
PPAstVariableDeclaration = POINTER TO PAstVariableDeclaration;
@ -58,7 +60,7 @@ TYPE
PAstModule = POINTER TO AstModule;
PROCEDURE parse_type_expression(lexer: PLexer): PAstTypeExpression;
PROCEDURE parse_type_declaration(lexer: PLexer): PAstTypeDeclaration;
PROCEDURE parse_type_part(lexer: PLexer): PPAstTypeDeclaration;
PROCEDURE parse_variable_part(lexer: PLexer): PPAstVariableDeclaration;
END Parser.