parse_node_kind.def 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // Note that this is an X-macro header.
  6. //
  7. // It does not use `#include` guards, and instead is designed to be `#include`ed
  8. // after the x-macro is defined in order for its inclusion to expand to the
  9. // desired output. The x-macro for this header is `CARBON_PARSE_NODE_KIND`. The
  10. // definition provided will be removed at the end of this file to clean up.
  11. #ifndef CARBON_PARSE_NODE_KIND
  12. #error "Must define the x-macro to use this file."
  13. #endif
  14. // Declarations.
  15. CARBON_PARSE_NODE_KIND(DeclarationEnd)
  16. CARBON_PARSE_NODE_KIND(EmptyDeclaration)
  17. CARBON_PARSE_NODE_KIND(DeclaredName)
  18. CARBON_PARSE_NODE_KIND(FunctionDeclaration)
  19. CARBON_PARSE_NODE_KIND(ParameterListEnd)
  20. CARBON_PARSE_NODE_KIND(ParameterList)
  21. CARBON_PARSE_NODE_KIND(VariableDeclaration)
  22. CARBON_PARSE_NODE_KIND(VariableInitializer)
  23. CARBON_PARSE_NODE_KIND(FileEnd)
  24. // Statements.
  25. CARBON_PARSE_NODE_KIND(CodeBlockEnd)
  26. CARBON_PARSE_NODE_KIND(CodeBlock)
  27. CARBON_PARSE_NODE_KIND(ExpressionStatement)
  28. CARBON_PARSE_NODE_KIND(IfStatement)
  29. CARBON_PARSE_NODE_KIND(IfStatementElse)
  30. CARBON_PARSE_NODE_KIND(WhileStatement)
  31. CARBON_PARSE_NODE_KIND(Condition)
  32. CARBON_PARSE_NODE_KIND(ConditionEnd)
  33. CARBON_PARSE_NODE_KIND(ContinueStatement)
  34. CARBON_PARSE_NODE_KIND(BreakStatement)
  35. CARBON_PARSE_NODE_KIND(StatementEnd)
  36. // Expressions.
  37. CARBON_PARSE_NODE_KIND(Literal)
  38. CARBON_PARSE_NODE_KIND(NameReference)
  39. CARBON_PARSE_NODE_KIND(ParenExpression)
  40. CARBON_PARSE_NODE_KIND(ParenExpressionEnd)
  41. CARBON_PARSE_NODE_KIND(DesignatorExpression)
  42. CARBON_PARSE_NODE_KIND(DesignatedName)
  43. CARBON_PARSE_NODE_KIND(CallExpression)
  44. CARBON_PARSE_NODE_KIND(CallExpressionComma)
  45. CARBON_PARSE_NODE_KIND(CallExpressionEnd)
  46. CARBON_PARSE_NODE_KIND(PrefixOperator)
  47. CARBON_PARSE_NODE_KIND(InfixOperator)
  48. CARBON_PARSE_NODE_KIND(PostfixOperator)
  49. #undef CARBON_PARSE_NODE_KIND