diff --git a/src/ast.h b/src/ast.h index 9a5227d12..9d92fc569 100644 --- a/src/ast.h +++ b/src/ast.h @@ -211,15 +211,15 @@ void accept_field_visitor(FieldVisitor &v, bool reverse, Field &field, Rest &... /// node_t is the base node of all AST nodes. /// It is not a template: it is possible to work concretely with this type. struct node_t { + /// The parent node, or null if this is root. + const node_t *parent{nullptr}; + /// The type of this node. const type_t type; /// The category of this node. const category_t category; - /// The parent node, or null if this is root. - const node_t *parent{nullptr}; - constexpr explicit node_t(type_t t, category_t c) : type(t), category(c) {} /// Disallow copying, etc.