summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/parser
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2024-03-14 12:33:56 +0300
committerDanil Alexeev <danil@alexeev.xyz>2024-04-10 08:51:02 +0300
commit02253b6b91472e251418bd0545afb2b653b5385c (patch)
treeb2b4191e82e3af8d0f8852b92f33ad91587d0856 /modules/gdscript/tests/scripts/parser
parent6c579280630715ff7da8310d405ef34194847294 (diff)
downloadredot-engine-02253b6b91472e251418bd0545afb2b653b5385c.tar.gz
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