From 4f2e1cdb6e2bc6d44d5e8ad51a2e6992c7ef3da8 Mon Sep 17 00:00:00 2001 From: Kyryl Riabov Date: Tue, 13 Aug 2024 13:20:18 +0300 Subject: [PATCH] Changed order of ternary and unary expressions --- grammar/Circom.g4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammar/Circom.g4 b/grammar/Circom.g4 index b42eaa8..2db61de 100644 --- a/grammar/Circom.g4 +++ b/grammar/Circom.g4 @@ -86,8 +86,8 @@ expression : primary #PrimaryExpression | blockInstantiation #BlockInstantiationExpression | expression '.' ID ('[' expression ']')? #DotExpression - | expression '?' expression ':' expression #TernaryExpression | op=('~' | '!') expression #UnaryExpression + | expression '?' expression ':' expression #TernaryExpression | expression op=('**' | '*' | '/' | '\\' | '%') expression #BinaryExpression | expression op=('+' | '-') expression #BinaryExpression | expression op=('<<' | '>>') expression #BinaryExpression