Skip to content

Commit

Permalink
Allow escaping ';' and '"' in macro args
Browse files Browse the repository at this point in the history
In macro args, ',' and '\' can be escaped to prevent
starting a new argument or escape sequence.
This also lets ';' and '"' be escaped to prevent
starting a comment or string literal.
  • Loading branch information
Rangi42 committed Jan 3, 2021
1 parent b1efc1c commit a040fe5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/asm/lexer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1988,8 +1988,10 @@ static int yylex_RAW(void)
case '\\': /* Character escape */
c = peek(1);
switch (c) {
case '"':
case ';':
case ',':
shiftChars(1);
shiftChars(1); /* Shift the backslash */
break;

case ' ':
Expand Down

0 comments on commit a040fe5

Please sign in to comment.