diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2025-01-18 23:34:35 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2025-01-18 23:34:35 +0100 |
commit | 90679500271f9d9e19b252ee627a4fc86e147ef6 (patch) | |
tree | 8f8995827dce38bb5a9a57b753178f36935e4c85 /grammar.ebnf | |
parent | Feature: Add basic support for if statements (diff) | |
download | interpreter-90679500271f9d9e19b252ee627a4fc86e147ef6.tar.gz interpreter-90679500271f9d9e19b252ee627a4fc86e147ef6.tar.bz2 interpreter-90679500271f9d9e19b252ee627a4fc86e147ef6.zip |
Feature: Add support for substraction
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 caf8c73..86710a2 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -12,11 +12,9 @@ ReturnStatement ::= RETURN Expression FunctionArguments ::= Expression ("," Expression)* ---TODO: == - Expression ::= AdditiveExpression | FunctionDefinition -AdditiveExpression ::= PrimaryExpression ("+" AdditiveExpression) +AdditiveExpression ::= PrimaryExpression (("+" | "-") AdditiveExpression) PrimaryExpression ::= NUMBER | IDENTIFIER | FunctionCallStatement |