Improve XHPAST consistency around statement lists
Summary:
XHPAST is inconsistent about whether or not braces are included in the token
range for n_STATEMENT_LIST nodes. Make it alwyas include them.
(This came up while writing a lint rule for brace formatting.)
NEXPAND(x, y, z) is a macro which takes y, extends is initial token range
leftward to x, extends its terminal token range rightward to z, and returns y.
It is equivalent to NMORE(y, z); NLMORE(y, x);
NOTE: This will require a rebuild of XHPAST in the Facebook stack.
Test Plan:
- Used XHPAST web viewer to verify resulting AST/CTS output.
- Wrote a lint rule which fixes brace formatting (see next revision).
Reviewers: jungejason, tuomaspelkonen, aran, pad, scoates
CC: hunterbridges, aran, epriestley
Differential Revision: 754