aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-01 11:36:44 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-01 11:36:44 +0100
commit51d1f741002cde0a5061faa61d7ccf90d097e101 (patch)
treeefa2c26aa74bad415db11165c953681c5b19ed60 /src/mds-kbdc
parentwhitespace (diff)
downloadmds-51d1f741002cde0a5061faa61d7ccf90d097e101.tar.gz
mds-51d1f741002cde0a5061faa61d7ccf90d097e101.tar.bz2
mds-51d1f741002cde0a5061faa61d7ccf90d097e101.tar.xz
mds-kbdc: we cannot at the validation level determine if a value-statment is a set-statement, therefore, we do not validate value-statements yet
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/mds-kbdc/validate-tree.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mds-kbdc/validate-tree.c b/src/mds-kbdc/validate-tree.c
index d835536..05c7555 100644
--- a/src/mds-kbdc/validate-tree.c
+++ b/src/mds-kbdc/validate-tree.c
@@ -356,19 +356,19 @@ static int validate_assumption(mds_kbdc_tree_assumption_t* restrict tree)
static int validate_map(mds_kbdc_tree_map_t* restrict tree)
{
int is_value = tree->result == NULL;
- if (information && is_value)
- NEW_ERROR_WITH_INCLUDES(tree, includes_ptr, ERROR, "value-statement inside information clause");
+ if (is_value);
+ /* We do not want value-statments outside function
+ * definitions, however, we do want \set/3 to be usable,
+ * from anywhere, even indirectly, therefore we cannot,
+ * at this process level, determine whether a
+ * value-statement is used correctly or not.
+ */
else if (information)
NEW_ERROR_WITH_INCLUDES(tree, includes_ptr, ERROR, "mapping-statement inside information clause");
- else if (assumption && is_value)
- NEW_ERROR_WITH_INCLUDES(tree, includes_ptr, ERROR, "value-statement inside assumption clause");
else if (assumption)
NEW_ERROR_WITH_INCLUDES(tree, includes_ptr, ERROR, "mapping-statement inside assumption clause");
- else if (function && !is_value)
+ else if (function)
NEW_ERROR_WITH_INCLUDES(tree, includes_ptr, ERROR, "mapping-statement inside function definition");
- else if ((function == NULL) && is_value)
- NEW_ERROR_WITH_INCLUDES(tree, includes_ptr, ERROR, "value-statement outside function definition");
- /* FIXME \set outside function definition must be supported (warn if inside quotes) */
return 0;
pfail:
return -1;