From 8b969bfe7d7e9b98af6c780c567155c699cfe3e5 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Mon, 28 Apr 2025 22:12:46 +0200 Subject: Start implementing import functionality --- grammar.ebnf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'grammar.ebnf') diff --git a/grammar.ebnf b/grammar.ebnf index 18d71da..70a1bfd 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -1,9 +1,11 @@ Program ::= Statement+ -Statement ::= (AssignmentStatement | ExternDeclaration | FunctionCallStatement | IfStatement | WhileStatement | ReturnStatement) SEMICOLON +Statement ::= (AssignmentStatement | ImportDeclaration | ExternDeclaration | FunctionCallStatement | IfStatement | WhileStatement | ReturnStatement) SEMICOLON AssignmentStatement ::= ("let")? ("*")? Expression EQUALS Expression +ImportDeclaration ::= "import" STRING + ExternDeclaration ::= "extern" IDENTIFIER EQUALS Type FunctionCallStatement ::= (IDENTIFIER | FunctionDefinition) LPAREN FunctionArguments? RPAREN -- cgit 1.4.1