duaraghav8 / soltar

Generate Solidity Code from its AST
https://www.npmjs.com/package/soltar
MIT License
15 stars 7 forks source link

bracketing fuckups #9

Closed duaraghav8 closed 8 years ago

duaraghav8 commented 8 years ago
if (a && (b || (!c))) { foo (); }

the AST for the above, when passed to soltar.generate (), generates the following:

if (a && b || !c) {\n\tfoo ();\n}

Another example

(89 * 2) - (12 + (34 / (y**2))) + (23 % (2**2))

output:

89 * 2 - 12 + 34 / y ** 2 + 23 % 2 ** 2;

there should be brackets :'(