diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2025-01-18 11:07:55 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2025-01-18 11:07:59 +0100 |
commit | 6ff305a75c1271ddfd337f8f3b1dfc7724a0dd6e (patch) | |
tree | 568a945af85b68f0e65da5468e02b665dc90062a /grammar.ebnf | |
parent | Lang: Start introducing support for function arguments (diff) | |
download | interpreter-6ff305a75c1271ddfd337f8f3b1dfc7724a0dd6e.tar.gz interpreter-6ff305a75c1271ddfd337f8f3b1dfc7724a0dd6e.tar.bz2 interpreter-6ff305a75c1271ddfd337f8f3b1dfc7724a0dd6e.zip |
Misc: Implement print function as "native" function
Diffstat (limited to 'grammar.ebnf')
-rw-r--r-- | grammar.ebnf | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/grammar.ebnf b/grammar.ebnf index 406c2d0..35a7079 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -1,11 +1,9 @@ Program ::= Statement+ -Statement ::= (AssignmentStatement | PrintStatement | FunctionCallStatement) SEMICOLON +Statement ::= (AssignmentStatement | FunctionCallStatement) SEMICOLON AssignmentStatement ::= "let" IDENTIFIER EQUALS Expression -PrintStatement ::= PRINT LPAREN Expression RPAREN -- TODO: this won't be needed once functions support arguments - FunctionCallStatement ::= IDENTIFIER LPAREN FunctionArguments? RPAREN FunctionArguments ::= Expression ("," Expression)* |