From c5c0bddc337dca4e41bc0448f72aa57b32cf4b48 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sat, 12 May 2018 10:52:44 -0400 Subject: [PATCH] Allow multiple consecutive string literals --- src/parser/parser.yc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parser/parser.yc b/src/parser/parser.yc index d094749..b34190d 100644 --- a/src/parser/parser.yc +++ b/src/parser/parser.yc @@ -128,10 +128,15 @@ constant primary_expression : IDENTIFIER | constant - | STRING_LITERAL + | string_literals | LPAREN expression RPAREN ; +string_literals + : STRING_LITERAL + | string_literals STRING_LITERAL + ; + postfix_expression : primary_expression | postfix_expression LBRACKET expression RBRACKET