Support concatenation of adjacent string literals in the parser.
Fixes issue #208.
This commit is contained in:
6
parse.yy
6
parse.yy
@@ -250,6 +250,12 @@ struct ForeachDimension {
|
|||||||
|
|
||||||
string_constant
|
string_constant
|
||||||
: TOKEN_STRING_LITERAL { $$ = new std::string(*yylval.stringVal); }
|
: TOKEN_STRING_LITERAL { $$ = new std::string(*yylval.stringVal); }
|
||||||
|
| string_constant TOKEN_STRING_LITERAL
|
||||||
|
{
|
||||||
|
std::string s = *((std::string *)$1);
|
||||||
|
s += *yylval.stringVal;
|
||||||
|
$$ = new std::string(s);
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
primary_expression
|
primary_expression
|
||||||
|
|||||||
Reference in New Issue
Block a user