Here's a fix for the paren matching in <!() expansions.  It now will correctly match parens within a command substitution, although there is no way to escape parens, so you couldn't currently have a command substitution like <!(echo ")") or <!(echo \)), but that could be added later.
Here's a fix for the paren matching in <!() expansions.  It now will correctly match parens within a command substitution, although there is no way to escape parens, so you couldn't currently have a command substitution like <!(echo ")") or <!(echo \)), but that could be added later.

In addition to the paren matching, I also do recursive expansion of <!() expansions (but NOT other variable substitutions), because without that, having parens in a command wouldn't provide a lot of benefit.  This means you can do things like <!(cp <@(_inputs) <(outdir)) and it will work.  Nested expansions like <!(cp <!(ls /tmp) outdir) also work.

This change shouldn't affect any existing gyp files because parens in a command were strictly verboten before, so there can't be any (well, any that work already anyhow).
Review URL: http://codereview.chromium.org/131048
witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp