diff options
| author | Baitinq <[email protected]> | 2025-05-10 13:25:41 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-05-10 13:25:50 +0200 |
| commit | 36f0b2f486fbec48972a96581576b5008062be6f (patch) | |
| tree | a3a74d72aea5df49059e7f14a63f17c62154ea42 /grammar.ebnf | |
| parent | Misc: Add gitattributes (diff) | |
| download | pry-lang-36f0b2f486fbec48972a96581576b5008062be6f.tar.gz pry-lang-36f0b2f486fbec48972a96581576b5008062be6f.tar.bz2 pry-lang-36f0b2f486fbec48972a96581576b5008062be6f.zip | |
Feature: Add support for imports
Diffstat (limited to 'grammar.ebnf')
| -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 |