Support multi-digit macro arguments in angle brackets#844
Conversation
|
There's no open issue for this feature but I remember it being suggested before. (Full expressions inside parentheses wouldn't be practical because that's parsing, not lexing.) Edit: it was issue #460. At the time it was closed because of "the difficulty in implementing the original request, on top of a suitable workaround existing". However, @aaaaaa123456789 's original And pokecrystal's |
|
This also removes the out-of-date documentation lines about macros having max 256 arguments. |
This allows access to arguments past \9 without using 'shift'
For example, \(_NARG) will get the last argument
|
While I certainly don't have any problems with the code change (except maybe how many forward declarations are needed? :S), I'm less sure about the syntax change. This syntax couldn't be |
|
Agreed about the forward declarations; I'll see if there's a rearrangement that reduces their overall count. You're right about parentheses: #704 proposes keeping track of parentheses nesting in macro arguments and allowing commas inside them, so e.g. Alternate syntaxes: brackets |
|
|
`\(` is more likely to be a valid escape sequence in the
future (as is `\[`) and `\{` is already taken.
Identifiers, {interpolations} and \<macroArgs> are distinct
|
(Angle brackets are kind of appropriate for being related to macro args. Some older assemblers used them to surround argument values that needed actual commas, e.g. (Also, this assembler allowed 36 arguments, |
This allows access to arguments past
\9without usingshift.