Constant Types

Edit pageLast modified: 02 February 2025

Unlike identifiers (type names), constants cannot contain the dash (-) character. However, the grammar of the type name and the constant are identical, so this conflict of semantics will have to be resolved independently during the implementation of a custom solution that uses the TypeLang grammar.

Namespaces specifying a reference to a constant are also allowed.

Given the complete identity of the grammar of constants with named type, they cannot contain case-insensitive names true, false and null of literals.

tip

Example of global constant (or type name)

JSON_THROW_ON_ERROR

tip

Example of namespaced constant (or type name)

pcov\version