Support concatenation of adjacent string literals in the parser.

Fixes issue #208.
This commit is contained in:
Matt Pharr
2012-03-28 08:52:09 -07:00
parent 8368ba8539
commit 013a3e7567

View File

@@ -250,6 +250,12 @@ struct ForeachDimension {
string_constant
: 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