summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/99_bugs/06_lexer_escape_at_boundary
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-07-17 23:21:03 +0200
committerJo-Philipp Wich <jo@mein.io>2022-07-30 13:46:23 +0200
commit10e056d3744384a029f05de5903c489898722fc3 (patch)
treee6621194f1053fdc314dfee02358972028a6a5ff /tests/custom/99_bugs/06_lexer_escape_at_boundary
parent862e49de33bd07daea129d553968579019c79b59 (diff)
compiler: add support for import/export statements
This commit introduces syntax level support for ES6 style module import and export statements. Imports are resolved at compile time and the corresponding module code is compiled into the main program. Also add testcases to cover import and export statement semantics. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom/99_bugs/06_lexer_escape_at_boundary')
-rw-r--r--tests/custom/99_bugs/06_lexer_escape_at_boundary12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/custom/99_bugs/06_lexer_escape_at_boundary b/tests/custom/99_bugs/06_lexer_escape_at_boundary
new file mode 100644
index 0000000..e80b0a1
--- /dev/null
+++ b/tests/custom/99_bugs/06_lexer_escape_at_boundary
@@ -0,0 +1,12 @@
+When the lexer processed a backslash introducing a string escape directly
+at the buffer boundary, the backslash was incorrectly retained.
+
+-- Testcase --
+{%
+ print("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl\n");
+%}
+-- End --
+
+-- Expect stdout --
+abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkl
+-- End --