Implement a '#' prefix for raw identifiers that may alias keywords (#1480)

* Implement a '#' prefix for raw identifiers that may alias keywords

* Review comments

* Disallow hashless raw identifiers in interpolations

* Run clang-format
This commit is contained in:
Sylvie
2024-08-21 13:31:44 -04:00
committed by GitHub
parent 82e81ab1da
commit b438c83bda
11 changed files with 114 additions and 13 deletions

View File

@@ -1068,7 +1068,20 @@ Additionally, label names can contain up to a single dot
.Ql \&. ,
which may not be the first character.
.Pp
A symbol cannot have the same name as a reserved keyword.
A symbol cannot have the same name as a reserved keyword, unless it is prefixed by a hash
.Sq # .
For example,
.Ql #load
denotes a symbol named
.Ql load ,
and
.Ql #LOAD
denotes a different symbol named
.Ql LOAD ;
in both cases the
.Sq #
prevents them from being treated as the keyword
.Ic LOAD .
.Ss Labels
One of the assembler's main tasks is to keep track of addresses for you, so you can work with meaningful names instead of
.Dq magic