whitequark/parser

Nested heredocs

Opened this issue · 0 comments

[<<A,
#{<<B}
b
B
a
A
0]

This is giving:

s(:array,
  s(:dstr,
    s(:begin,
      s(:str, "b\n")),
    s(:str, "\n"),
    s(:str, "b\n"),
    s(:str, "B\n"),
    s(:str, "a\n")),
  s(:int, 0))

when I think it should be giving:

s(:array,
  s(:dstr,
    s(:begin,
      s(:str, "b\n")),
    s(:str, "\n"),
    s(:str, "a\n")),
  s(:int, 0))