mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-06 20:18:14 +00:00
Implement test/Feature/escaped_label.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18741 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -139,6 +139,7 @@ VarID %[-a-zA-Z$._][-a-zA-Z$._0-9]*
|
|||||||
|
|
||||||
/* Label identifiers end with a colon */
|
/* Label identifiers end with a colon */
|
||||||
Label [-a-zA-Z$._0-9]+:
|
Label [-a-zA-Z$._0-9]+:
|
||||||
|
QuoteLabel \"[^\"]*\":
|
||||||
|
|
||||||
/* Quoted names can contain any character except " and \ */
|
/* Quoted names can contain any character except " and \ */
|
||||||
StringConstant \"[^\"]*\"
|
StringConstant \"[^\"]*\"
|
||||||
@@ -269,6 +270,12 @@ getelementptr { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
|
|||||||
llvmAsmlval.StrVal = strdup(yytext);
|
llvmAsmlval.StrVal = strdup(yytext);
|
||||||
return LABELSTR;
|
return LABELSTR;
|
||||||
}
|
}
|
||||||
|
{QuoteLabel} {
|
||||||
|
yytext[strlen(yytext)-2] = 0; // nuke colon, end quote
|
||||||
|
UnEscapeLexed(yytext+1);
|
||||||
|
llvmAsmlval.StrVal = strdup(yytext+1);
|
||||||
|
return LABELSTR;
|
||||||
|
}
|
||||||
|
|
||||||
{StringConstant} { // Note that we cannot unescape a string constant here! The
|
{StringConstant} { // Note that we cannot unescape a string constant here! The
|
||||||
// string constant might contain a \00 which would not be
|
// string constant might contain a \00 which would not be
|
||||||
|
|||||||
Reference in New Issue
Block a user