diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-10 15:11:41 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-10 15:11:41 +0100 |
commit | b352b77ea31a112a7354edf0100e2c25599aed54 (patch) | |
tree | cab5fbbeaaf66fef61103676043eb1f7ab20f191 | |
parent | add xmemdup macro (diff) | |
download | mds-b352b77ea31a112a7354edf0100e2c25599aed54.tar.gz mds-b352b77ea31a112a7354edf0100e2c25599aed54.tar.bz2 mds-b352b77ea31a112a7354edf0100e2c25599aed54.tar.xz |
mds-kbdc: compile-layout: test return
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-kbdc/compile-layout.c | 2 | ||||
-rw-r--r-- | test-files/mds-kbdc/compile-layout/valid/return | 24 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index 011d2d0..e15e7e4 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -2555,7 +2555,7 @@ static int compile_subtree(mds_kbdc_tree_t* restrict tree) case C(ARRAY): c (array); break; case C(MAP): c (map); break; case C(MACRO_CALL): c (macro_call); break; - case C(RETURN): break_level = 3; break;/* TODO test */ + case C(RETURN): break_level = 3; break; case C(BREAK): break_level = 2; break; case C(CONTINUE): break_level = 1; break; default: diff --git a/test-files/mds-kbdc/compile-layout/valid/return b/test-files/mds-kbdc/compile-layout/valid/return new file mode 100644 index 0000000..9a052cc --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/valid/return @@ -0,0 +1,24 @@ +function f/0 + "a" + if 1 + return + end if + 0 +end function +function g/0 + "a" + if 1 + "b" + return + end if + 0 +end function +macro m/0 + "\f()" : "\g()" + if 1 + return + end if + "" : 0 +end macro +m() + |