Add true and false keywords to the parser.

This commit is contained in:
2018-08-10 16:06:30 -07:00
parent 7c8c547540
commit 3b79b5751a
5 changed files with 49 additions and 3 deletions

View File

@@ -1208,6 +1208,10 @@ libab_result _interpreter_run(struct interpreter_state* state, libab_tree* tree,
vec_index(&tree->children, 0),
vec_index(&tree->children, 1),
into);
} else if(tree->variant == TREE_TRUE) {
libab_get_true_value(state->ab, into);
} else if(tree->variant == TREE_FALSE) {
libab_get_false_value(state->ab, into);
} else {
libab_get_unit_value(state->ab, into);
}