Use recursion for parsing string bodies
This is a little bit faster than using the * operator combined with Array#inject.
This commit is contained in:
parent
e942086f2d
commit
23a441933a
|
@ -189,7 +189,8 @@ string
|
|||
;
|
||||
|
||||
string_body
|
||||
= T_STRING_BODY* { val[0].inject(:+) || '' }
|
||||
= T_STRING_BODY string_body { val[0] + val[1] }
|
||||
| _ { '' }
|
||||
;
|
||||
|
||||
%inner
|
||||
|
|
Loading…
Reference in New Issue