mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Merge pull request #139 from chastai/escape-cb
Allow { and } to be escaped in string literals
This commit is contained in:
@@ -565,6 +565,12 @@ yylex_ReadQuotedString()
|
||||
case '"':
|
||||
ch = '"';
|
||||
break;
|
||||
case '{':
|
||||
ch = '{';
|
||||
break;
|
||||
case '}':
|
||||
ch = '}';
|
||||
break;
|
||||
default:
|
||||
maxLength = MAXSTRLEN - index;
|
||||
length = CopyMacroArg(&yylval.tzString[index], maxLength, ch);
|
||||
@@ -698,6 +704,12 @@ yylex_MACROARGS()
|
||||
case '\\':
|
||||
ch = '\\';
|
||||
break;
|
||||
case '{':
|
||||
ch = '{';
|
||||
break;
|
||||
case '}':
|
||||
ch = '}';
|
||||
break;
|
||||
default:
|
||||
maxLength = MAXSTRLEN - index;
|
||||
length = CopyMacroArg(&yylval.tzString[index], maxLength, ch);
|
||||
|
||||
Reference in New Issue
Block a user