HNC icon indicating copy to clipboard operation
HNC copied to clipboard

C operator calls miss parentheses

Open nponeccop opened this issue 14 years ago • 0 comments

x = mul 2 (sum 3 4) should be translated to int x = 2 * (3 + 4) instead of x = 2 * 3 + 4.

However, x = sum 2 (mul 3 4) should still be translated to int x = 2 + 3 * 4 as parentheses are not necessary because of priorities.

Create tests in hn_tests/ and extend CPP.Visualise.showAtomApplication.

nponeccop avatar Oct 08 '11 10:10 nponeccop