semantics_builtin_kind.def 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  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_SEMANTICS_BUILTIN_KIND
  12. #error "Must define the x-macro to use this file."
  13. #endif
  14. // Tracks expressions which are valid as types.
  15. CARBON_SEMANTICS_BUILTIN_KIND(TypeType)
  16. // Used when a SemanticNode has an invalid type, which should then be ignored
  17. // for future type checking.
  18. CARBON_SEMANTICS_BUILTIN_KIND(InvalidType)
  19. // The type of integers and integer literals, currently always i32. Long-term
  20. // we may not want it this way, but for now this is the approach.
  21. CARBON_SEMANTICS_BUILTIN_KIND(IntegerType)
  22. // The type of reals and real literals, currently always f64. Long-term
  23. // we may not want it this way, but for now this is the approach.
  24. CARBON_SEMANTICS_BUILTIN_KIND(RealType)
  25. // Keep invalid last, so that we can use values as array indices without needing
  26. // an invalid entry.
  27. CARBON_SEMANTICS_BUILTIN_KIND(Invalid)
  28. #undef CARBON_SEMANTICS_BUILTIN_KIND