diff --git a/src/lexer/strings.js b/src/lexer/strings.js index 689213e5f..0dde69735 100644 --- a/src/lexer/strings.js +++ b/src/lexer/strings.js @@ -16,6 +16,7 @@ const valid_after_heredoc_73 = valid_after_heredoc.concat([ "/", "=", "!", + ".", ]); module.exports = { diff --git a/test/snapshot/__snapshots__/nowdoc.test.js.snap b/test/snapshot/__snapshots__/nowdoc.test.js.snap index 73ee4fa13..41926bd20 100644 --- a/test/snapshot/__snapshots__/nowdoc.test.js.snap +++ b/test/snapshot/__snapshots__/nowdoc.test.js.snap @@ -27,6 +27,104 @@ c", } `; +exports[`nowdoc Flexible nowdoc syntax: concatenation right after nowdoc 1`] = ` +Program { + "children": [ + Echo { + "expressions": [ + Bin { + "kind": "bin", + "left": Encapsed { + "kind": "encapsed", + "label": "END", + "raw": "<< + parser.parseEval( + ` +echo <<