summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/parser
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-04-15 18:14:38 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-04-15 18:14:38 +0200
commit684e7aa37a134afe0c6c9a5db252e64d5c3afd42 (patch)
tree705852b7ebc9f174d888468c6da23d11d7ece994 /modules/gdscript/tests/scripts/parser
parent49dd453ca7e2b63beecf84346a4938b6f1240899 (diff)
parent02253b6b91472e251418bd0545afb2b653b5385c (diff)
downloadredot-engine-684e7aa37a134afe0c6c9a5db252e64d5c3afd42.tar.gz
Merge pull request #89472 from dalexeev/gds-fix-bin-tokenizer-continuation-lines
GDScript: Fix continuation lines in `GDScriptTokenizerBuffer`
Diffstat (limited to 'modules/gdscript/tests/scripts/parser')
-rw-r--r--modules/gdscript/tests/scripts/parser/features/continuation_lines_comments.bin.gd12
-rw-r--r--modules/gdscript/tests/scripts/parser/features/continuation_lines_comments.bin.out2
2 files changed, 14 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/parser/features/continuation_lines_comments.bin.gd b/modules/gdscript/tests/scripts/parser/features/continuation_lines_comments.bin.gd
new file mode 100644
index 0000000000..cb0bc94d2e
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/continuation_lines_comments.bin.gd
@@ -0,0 +1,12 @@
+# GH-89403
+
+func test():
+ var x := 1
+ if x == 0 \
+ # Comment.
+ # Comment.
+ and (x < 1 or x > 2) \
+ # Comment.
+ and x != 3:
+ pass
+ print("Ok")
diff --git a/modules/gdscript/tests/scripts/parser/features/continuation_lines_comments.bin.out b/modules/gdscript/tests/scripts/parser/features/continuation_lines_comments.bin.out
new file mode 100644
index 0000000000..0e9f482af4
--- /dev/null
+++ b/modules/gdscript/tests/scripts/parser/features/continuation_lines_comments.bin.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+Ok