From 504fe367afdbf6a83ac25111b9d2d67e2145fcc4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 17 Nov 2014 04:53:01 +0100 Subject: mds-kbdc: fix treeisation of let-statements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- test-files/mds-kbdc/make-tree/valid/array | 36 +++++++++++++++++++++++++++++++ test-files/mds-kbdc/make-tree/valid/for | 17 +++++++++++++++ test-files/mds-kbdc/make-tree/valid/let | 14 ++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 test-files/mds-kbdc/make-tree/valid/array create mode 100644 test-files/mds-kbdc/make-tree/valid/for create mode 100644 test-files/mds-kbdc/make-tree/valid/let (limited to 'test-files/mds-kbdc/make-tree/valid') diff --git a/test-files/mds-kbdc/make-tree/valid/array b/test-files/mds-kbdc/make-tree/valid/array new file mode 100644 index 0000000..31b0c73 --- /dev/null +++ b/test-files/mds-kbdc/make-tree/valid/array @@ -0,0 +1,36 @@ +let \1 : { 1 2 4 8 16 32 48 } +let \2 : { 1 2 4 8 + 16 32 48 + } + +# (let (@ 1 0-3) ‘\1’ +# (.value nil +# (array (@ 1 9-10) +# (.elements +# (string (@ 1 11-12) ‘1’) +# (string (@ 1 13-14) ‘2’) +# (string (@ 1 15-16) ‘4’) +# (string (@ 1 17-18) ‘8’) +# (string (@ 1 19-21) ‘16’) +# (string (@ 1 22-24) ‘32’) +# (string (@ 1 25-27) ‘48’) +# ) +# ) +# ) +# ) +# (let (@ 2 0-3) ‘\2’ +# (.value nil +# (array (@ 129-10) +# (.elements +# (string (@ 2 11-12) ‘1’) +# (string (@ 2 13-14) ‘2’) +# (string (@ 2 15-16) ‘4’) +# (string (@ 2 17-18) ‘8’) +# (string (@ 3 11-13) ‘16’) +# (string (@ 3 14-16) ‘32’) +# (string (@ 3 17-19) ‘48’) +# ) +# ) +# ) +# ) + diff --git a/test-files/mds-kbdc/make-tree/valid/for b/test-files/mds-kbdc/make-tree/valid/for new file mode 100644 index 0000000..d8d549a --- /dev/null +++ b/test-files/mds-kbdc/make-tree/valid/for @@ -0,0 +1,17 @@ +for 0 to 9 as \1 + : \add(\1, "0") +end for + +# (for (@ 1 0-3) ‘0’ ‘9’ (.variable ‘\1’) +# (.inner +# (map (@ 2 2-2) +# (.sequence +# (keys (@ 2 2-24) ‘’) +# ) +# (.result +# (string (@ 2 27-40) ‘\add(\1, "0")’) +# ) +# ) +# ) +# ) + diff --git a/test-files/mds-kbdc/make-tree/valid/let b/test-files/mds-kbdc/make-tree/valid/let new file mode 100644 index 0000000..aa0c5da --- /dev/null +++ b/test-files/mds-kbdc/make-tree/valid/let @@ -0,0 +1,14 @@ +let \1 : "0" +let \2 : 48 + +# (let (@ 1 0-3) ‘\1’ +# (.value +# (string (@ 1 9-12) ‘"0"’) +# ) +# ) +# (let (@ 2 0-3) ‘\2’ +# (.value +# (string (@ 2 9-11) ‘48’) +# ) +# ) + -- cgit v1.2.3-70-g09d2