about summary refs log tree commit diff
path: root/boot/tests/parse/postfix_chaining.cskt
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2025-07-05 22:48:09 +0200
committerMel <mel@rnrd.eu>2025-07-05 22:48:09 +0200
commit620d82a5e314a82784e02b4af387a67d53242149 (patch)
treee91774653130cb34d19901aeaa7cdd6be97f3e93 /boot/tests/parse/postfix_chaining.cskt
parentb71f85a7c3ee9e36b6eab9f113436fa990f6e561 (diff)
downloadcatskill-620d82a5e314a82784e02b4af387a67d53242149.tar.zst
catskill-620d82a5e314a82784e02b4af387a67d53242149.zip
Correctly recurse over self-containing non-homogenous postfix-type expressions
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/tests/parse/postfix_chaining.cskt')
-rw-r--r--boot/tests/parse/postfix_chaining.cskt13
1 files changed, 13 insertions, 0 deletions
diff --git a/boot/tests/parse/postfix_chaining.cskt b/boot/tests/parse/postfix_chaining.cskt
new file mode 100644
index 0000000..c2267b4
--- /dev/null
+++ b/boot/tests/parse/postfix_chaining.cskt
@@ -0,0 +1,13 @@
+correct handling of different recursive postfix expressions,
+to prevent previous regression of only allowing homogeneous
+postfix recursion.
+
+<<<
+
+a[1][2][3]
+a.b("hi")!?++--
+
+>>>
+
+(expr (subscript (expr (subscript (expr (subscript (expr (name a)) (expr 1))) (expr 2))) (expr 3)))
+(expr (increment/decrement -- postfix (expr (increment/decrement ++ postfix (expr (try (expr (must (expr (call/construct (expr (member of (expr (name a)) named b)) (arg (expr "hi"))))))))))))
\ No newline at end of file