Files
carbon-lang/toolchain/sem_ir/node_kind.def
T
Richard Smith a46e7dd967 Remove most of the metaprogramming in node.h in favor of listing all the members in the typed node structs. (#3310)
Split `node.h` into separate files for ID types (`id.h`) and for typed
nodes (`typed_nodes.h`). The per-node-kind data is now specified as part
of declaring the typed nodes, and is removed from the node kinds
x-macros, which now simply enumerate the node kinds.
2023-10-20 20:26:10 +00:00

71 lines
2.6 KiB
Modula-2

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// This is an X-macro header. It does not use `#include` guards, and instead is
// designed to be `#include`ed after the x-macro is defined in order for its
// inclusion to expand to the desired output. Macro definitions are cleaned up
// at the end of this file.
//
// This macro should be defined before including this header:
// - CARBON_SEM_IR_NODE_KIND(Name)
// Invoked for each kind of semantic node.
#ifndef CARBON_SEM_IR_NODE_KIND
#error "Must define the x-macro to use this file."
#endif
// For each node kind declared here there is a matching definition in
// `typed.nodes.h`.
CARBON_SEM_IR_NODE_KIND(AddressOf)
CARBON_SEM_IR_NODE_KIND(ArrayIndex)
CARBON_SEM_IR_NODE_KIND(ArrayInit)
CARBON_SEM_IR_NODE_KIND(ArrayType)
CARBON_SEM_IR_NODE_KIND(Assign)
CARBON_SEM_IR_NODE_KIND(BinaryOperatorAdd)
CARBON_SEM_IR_NODE_KIND(BindName)
CARBON_SEM_IR_NODE_KIND(BindValue)
CARBON_SEM_IR_NODE_KIND(BlockArg)
CARBON_SEM_IR_NODE_KIND(BoolLiteral)
CARBON_SEM_IR_NODE_KIND(Branch)
CARBON_SEM_IR_NODE_KIND(BranchIf)
CARBON_SEM_IR_NODE_KIND(BranchWithArg)
CARBON_SEM_IR_NODE_KIND(Builtin)
CARBON_SEM_IR_NODE_KIND(Call)
CARBON_SEM_IR_NODE_KIND(ClassDeclaration)
CARBON_SEM_IR_NODE_KIND(ConstType)
CARBON_SEM_IR_NODE_KIND(CrossReference)
CARBON_SEM_IR_NODE_KIND(Dereference)
CARBON_SEM_IR_NODE_KIND(FunctionDeclaration)
CARBON_SEM_IR_NODE_KIND(InitializeFrom)
CARBON_SEM_IR_NODE_KIND(IntegerLiteral)
CARBON_SEM_IR_NODE_KIND(NameReference)
CARBON_SEM_IR_NODE_KIND(Namespace)
CARBON_SEM_IR_NODE_KIND(NoOp)
CARBON_SEM_IR_NODE_KIND(Parameter)
CARBON_SEM_IR_NODE_KIND(PointerType)
CARBON_SEM_IR_NODE_KIND(RealLiteral)
CARBON_SEM_IR_NODE_KIND(ReturnExpression)
CARBON_SEM_IR_NODE_KIND(Return)
CARBON_SEM_IR_NODE_KIND(SpliceBlock)
CARBON_SEM_IR_NODE_KIND(StringLiteral)
CARBON_SEM_IR_NODE_KIND(StructAccess)
CARBON_SEM_IR_NODE_KIND(StructInit)
CARBON_SEM_IR_NODE_KIND(StructLiteral)
CARBON_SEM_IR_NODE_KIND(StructTypeField)
CARBON_SEM_IR_NODE_KIND(StructType)
CARBON_SEM_IR_NODE_KIND(StructValue)
CARBON_SEM_IR_NODE_KIND(TemporaryStorage)
CARBON_SEM_IR_NODE_KIND(Temporary)
CARBON_SEM_IR_NODE_KIND(TupleAccess)
CARBON_SEM_IR_NODE_KIND(TupleIndex)
CARBON_SEM_IR_NODE_KIND(TupleInit)
CARBON_SEM_IR_NODE_KIND(TupleLiteral)
CARBON_SEM_IR_NODE_KIND(TupleType)
CARBON_SEM_IR_NODE_KIND(TupleValue)
CARBON_SEM_IR_NODE_KIND(UnaryOperatorNot)
CARBON_SEM_IR_NODE_KIND(ValueAsReference)
CARBON_SEM_IR_NODE_KIND(VarStorage)
#undef CARBON_SEM_IR_NODE_KIND