TODO
Identifier Expressions
An identifier expression consists of a single identifier:
someName
When evaluated, this expression looks up someName in the environment of the expression and yields the value of a declaration with a matching name.
An identifier expression is an l-value if the declaration it refers to is mutable.
Overloading
It is possible for an identifier expression to be overloaded, such that it refers to one or more candidate declarations with the same name. If the expression appears in a context where the correct declaration to use can be disambiguated, then that declaration is used as the result of the name expression; otherwise use of an overloaded name is an error at the use site.
Implicit Lookup
It is possible for a name expression to refer to nested declarations in two ways:
-
In the body of a method, a reference to
someNamemay resolve tothis.someName, using the implicitthisparameter of the method -
When a global-scope
cbufferortbufferdeclaration is used,someNamemay refer to a field declared inside thecbufferortbuffer