summary refs log tree commit diff
path: root/grammar.ebnf
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2025-01-18 23:34:35 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2025-01-18 23:34:35 +0100
commit90679500271f9d9e19b252ee627a4fc86e147ef6 (patch)
tree8f8995827dce38bb5a9a57b753178f36935e4c85 /grammar.ebnf
parentFeature: Add basic support for if statements (diff)
downloadinterpreter-90679500271f9d9e19b252ee627a4fc86e147ef6.tar.gz
interpreter-90679500271f9d9e19b252ee627a4fc86e147ef6.tar.bz2
interpreter-90679500271f9d9e19b252ee627a4fc86e147ef6.zip
Feature: Add support for substraction
Diffstat (limited to 'grammar.ebnf')
-rw-r--r--grammar.ebnf4
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