aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-10 01:16:09 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-10 01:16:09 +0100
commit58d10b17ca767635b1e38cb2e57d07438478571b (patch)
treed4526e6328f2c3dee737279275cb39a0f6db254e /src/mds-kbdc
parentmds-kbdc: compile-layout: m + more test cases (diff)
downloadmds-58d10b17ca767635b1e38cb2e57d07438478571b.tar.gz
mds-58d10b17ca767635b1e38cb2e57d07438478571b.tar.bz2
mds-58d10b17ca767635b1e38cb2e57d07438478571b.tar.xz
mds-kbdc: compile-layout: m bug fix + more test cases
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-kbdc')
-rw-r--r--src/mds-kbdc/compile-layout.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c
index e6b6ced..574f818 100644
--- a/src/mds-kbdc/compile-layout.c
+++ b/src/mds-kbdc/compile-layout.c
@@ -19,8 +19,6 @@
/* TODO add call stack */
/* TODO fix so that for-loops do not generate the same errors/warnings in all iterations [loopy_error]. */
/* TODO test set/3 and get/2 */
-/* TODO test function- and macro-overloading */
-/* TODO test same-named macros and functions */
#include "include-stack.h"
#include "builtin-functions.h"
@@ -521,7 +519,7 @@ static size_t check_function_calls_in_literal_(const mds_kbdc_tree_t* restrict t
while ((c = *raw++))
{
- if ((c != ' ') && space)
+ if (space && !strchr(" )", c))
space = 0, count++;
if (escape)
@@ -2556,7 +2554,7 @@ static int compile_subtree(mds_kbdc_tree_t* restrict tree)
case C(STRING): c (string); break;
case C(ARRAY): c (array); break;
case C(MAP): c (map); break;
- case C(MACRO_CALL): c (macro_call); break;/* TODO test */
+ case C(MACRO_CALL): c (macro_call); break;
case C(RETURN): break_level = 3; break;/* TODO test */
case C(BREAK): break_level = 2; break;
case C(CONTINUE): break_level = 1; break;