You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[AST] NFC: Refactor ASTDumper to use a "label" abstraction.
ASTDumper allows nodes/values to be printed without labels, which
works fine for the default output but won't work for JSON when every
value needs to have a valid key. To balance these needs, we create
a `Label` abstraction that can be created as either `always` or
`optional`. All the current labels are treated as `always`, and all
other values have had `optional` labels associated with them, which
won't be printed in the default AST dump.
This change also adds a `printList` function that replaces anywhere
that `for` loops with `printRec` calls in their bodies. This will
be used to provide the necessary array structuring for JSON output
later. (There are some places where `for` loops call `printFlag`
which will need to be dealt with later.)
0 commit comments