diff options
| author | Baitinq <[email protected]> | 2025-04-28 22:12:46 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-04-28 22:12:46 +0200 |
| commit | 8b969bfe7d7e9b98af6c780c567155c699cfe3e5 (patch) | |
| tree | e37cd9b9c8ea36ad869afd0e6e7c0b047456ed8b /grammar.ebnf | |
| parent | Bootstrap: Iterate chars (diff) | |
| download | interpreter-8b969bfe7d7e9b98af6c780c567155c699cfe3e5.tar.gz interpreter-8b969bfe7d7e9b98af6c780c567155c699cfe3e5.tar.bz2 interpreter-8b969bfe7d7e9b98af6c780c567155c699cfe3e5.zip | |
Start implementing import functionality import
Diffstat (limited to '')
| -rw-r--r-- | grammar.ebnf | 4 |
1 files changed, 3 insertions, 1 deletions
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 |