summaryrefslogtreecommitdiff
path: root/src/printer
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2021-05-21 09:05:45 -0700
committerGitHub <noreply@github.com>2021-05-21 16:05:45 +0000
commitbb39d534c89dc2569aa048bb053196bfa5bbb3a1 (patch)
treebe677fe7153c13cb36fac6d376ba24a78eeda763 /src/printer
parent23b990946473910eb8c781d555a4600efeb05b4b (diff)
Support braced-init-lists with `mkNode()` (#6580)
This commit adds support for braced-init-lists in calls to `mkNode()`, e.g., `mkNode(REGEXP_EMPTY, {})`. Previously, such a call would result in a node of kind `REGEXP_EMPTY` with a single null node as a child because the compiler chose the `mkNode(Kind kind, TNode child1)` variant and converted `{}` to a node using the default constructor. This commit adds an overload of `mkNode()` that takes an `initializer_list<TNode>` to allow this use case. It also adds a `mkNode()` overload with zero children for convenience and removes the 4- and 5-children variants because they saw little use. Finally, it makes the default constructor of `NodeTemplate` explicit to avoid accidental conversions.
Diffstat (limited to 'src/printer')
0 files changed, 0 insertions, 0 deletions
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback