about summary refs log tree commit diff
path: root/grammar.ebnf
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-01-22 00:30:28 +0100
committerBaitinq <[email protected]>2025-01-22 00:30:59 +0100
commit774498ff4db405eadd8ce295eb699586ed217f6d (patch)
tree106c0926321316cac67d57ea94df8444fd0b3f8f /grammar.ebnf
parentFeature: Add support for division and multiplication (diff)
downloadpry-lang-774498ff4db405eadd8ce295eb699586ed217f6d.tar.gz
pry-lang-774498ff4db405eadd8ce295eb699586ed217f6d.tar.bz2
pry-lang-774498ff4db405eadd8ce295eb699586ed217f6d.zip
Feature: Add support for negation
Diffstat (limited to 'grammar.ebnf')
-rw-r--r--grammar.ebnf2
1 files changed, 1 insertions, 1 deletions
diff --git a/grammar.ebnf b/grammar.ebnf
index 700147e..af2d9ec 100644
--- a/grammar.ebnf
+++ b/grammar.ebnf
@@ -22,7 +22,7 @@ AdditiveExpression ::= MultiplicativeExpression (("+" | "-") MultiplicativeExpre
 
 MultiplicativeExpression ::= UnaryExpression (("*" | "/") UnaryExpression)*
 
-UnaryExpression ::= "!" UnaryExpression | PrimaryExpression
+UnaryExpression ::= ("!" | "-") UnaryExpression | PrimaryExpression
 
 PrimaryExpression ::= NUMBER | BOOLEAN | IDENTIFIER | FunctionCallStatement | LPAREN Expression RPAREN