flandreas / antares

Digital circuit learning platform
49 stars 6 forks source link

Wrong parsing of DSL "if" statements with terms in conditions #702

Closed flandreas closed 5 months ago

flandreas commented 7 months ago

DSL if-statements with terms in conditions are not correctly parsed.

Example:

if (24 == 2 * 12) {
  1
}

Comparison operators like "==" should have precedence over term operators like "*".

As a workaround, you can put expressions into parentheses:

if (24 == (2 * 12)) {
  1
}