Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.39 KB

ii.5.3-identifiers.md

File metadata and controls

36 lines (24 loc) · 1.39 KB

II.5.3 Identifiers

Identifiers are used to name entities. Simple identifiers are equivalent to an ID. However, the ILAsm syntax allows the use of any identifier that can be formed using the Unicode character set (see Partition I). To achieve this, an identifier shall be placed within single quotation marks. This is summarized in the following grammar.

Id ::=
ID
| SQSTRING

A keyword shall only be used as an identifier if that keyword appears in single quotes (see Partition VI for a list of all keywords). Several Ids can be combined to form a larger Id, by separating adjacent pairs with a dot (.). An Id formed in this way is called a DottedName.

DottedName ::=
Id [ '.' Id ]*

[Rationale: DottedName is provided for convenience, since "." can be included in an Id using the SQSTRING syntax. DottedName is used in the grammar where '.' is considered a common character (e.g., in fully qualified type names) end rationale]

[Example: The following are simple identifiers:

A   Test   $Test   @Foo?   ?_X_   MyType`1

The following are identifiers in single quotes:

'Weird Identifier'   'Odd\102Char'   'Embedded\nReturn'

The following are dotted names:

System.Console   'My Project'.'My Component'.'My Name'   System.IComparable`1

end example]