vieiro commented on code in PR #5854:
URL: https://github.com/apache/netbeans/pull/5854#discussion_r1172782152
##########
ide/languages.hcl/src/org/netbeans/modules/languages/hcl/grammar/g4/HCLExpressionParser.g4:
##########
@@ -21,8 +21,9 @@ options { tokenVocab = HCLLexer; }
expression
: exprTerm
- | operation
- | <assoc=right> expression QUESTION expression COLON expression
+ | <assoc=right> unaryOperator expression
+ | expression binaryOperator expression
Review Comment:
As far as I recall the order of entries here is what decides operator
precedence. You may want to change:
```
| expression binaryOperator expression
```
Into
```
| expression orOperator expression
| expression andOperator expression
| expression eqOp expression
| expression compOp expression
(etc)
```
Following the operator precedence table at
https://github.com/hashicorp/hcl/issues/553
Otherwise the expression "1 + 2 / 3" may have different results.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists