From 0e236be5430112bd9bf95fdffaaf26fa95b5effb Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Sat, 7 Sep 2024 22:58:36 +0200 Subject: [PATCH] test: Return tests (including regression) --- test/corpus/return.txt | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 test/corpus/return.txt diff --git a/test/corpus/return.txt b/test/corpus/return.txt new file mode 100644 index 0000000..9cf166a --- /dev/null +++ b/test/corpus/return.txt @@ -0,0 +1,52 @@ +=== +Return +=== + +return 69 +return +69 + +# Regression test. + +return +a = 420 + +--- + +(source_file + (statement + (return + rv: (expression + (literal + (number) + ) + ) + ) + ) + (statement + (return) + ) + (statement + (expression + (literal + (number) + ) + ) + ) + (statement + (comment) + ) + (statement + (return) + ) + (statement + (assignment + left: (identifier) + right: (expression + (literal + (number) + ) + ) + ) + ) +)