diff options
Diffstat (limited to 'boot/tests')
| -rw-r--r-- | boot/tests/parse/postfix_chaining.cskt | 13 | ||||
| -rw-r--r-- | boot/tests/parse/try_must.cskt | 12 |
2 files changed, 25 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 diff --git a/boot/tests/parse/try_must.cskt b/boot/tests/parse/try_must.cskt index e69de29..b111ed5 100644 --- a/boot/tests/parse/try_must.cskt +++ b/boot/tests/parse/try_must.cskt @@ -0,0 +1,12 @@ +chaining of try and must expressions, with themselves +and across multiple members + +<<< + +a!.b?.c? +c!!! + +>>> + +(expr (try (expr (member of (expr (try (expr (member of (expr (must (expr (name a)))) named b)))) named c)))) +(expr (must (expr (must (expr (must (expr (name c)))))))) \ No newline at end of file |
