itemisCREATE / solidity-ide

Solidity plugin for Eclipse
Eclipse Public License 1.0
86 stars 25 forks source link

different operator precedence in Solidity #178

Closed andreasmuelder closed 6 years ago

andreasmuelder commented 6 years ago

In Solidity the operator precedence is different from the expression language used in YAKINDU Statechart Tools. Here, the precedence is the same as in Java and C.

This allows constructs in Solidity like

if (1&1 == 10){
  //Do something
}

This is a type error in the base expression language. Assuming that this is by design in Solidity we have to rework the operator precedence.

andreasmuelder commented 6 years ago

I think the only way to do this is by clone and own of the expressions grammar. This is a big refactoring and we will have some drawbacks regarding the SCT integration...

andreasmuelder commented 6 years ago

fixed