javascript - Sweet.js - Parenthesis in macros body -


i want use parenthesis in macros body group expressions. example:

macro m {   rule { ($x, $y) } => {     $x >>> ($y * 5)   } } 

sweet.js remove parenthesis:

m(6, 7) => 6 >>> 7 * 5 

i expect next output:

m(6, 7) => 6 >>> (7 * 5) 

how can escape parenthesis inside macros body?

sweet.js (technically escodegen sweet.js uses codegen) removes redundant parens (ie precedence rules mean 6 >>> 7 * 5 === 6 >>> (7 * 5) parens aren't needed) shouldn't need escape parens in macros.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -