Skip to content

Commit

Permalink
add control statements TODO list
Browse files Browse the repository at this point in the history
  • Loading branch information
Luís Möllmann committed Jun 6, 2017
1 parent 87688b8 commit 7b99770
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions astree.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,18 @@ static void second_pass(struct astree *tree, struct hashmap *declared_variables)
/* TODO: check if tree->children[0] and tree->children[1] are numeric */
}

if ( (tree->type == AST_WHEN)
|| (tree->type == AST_WHEN_ELSE)
|| (tree->type == AST_WHILE)) {
/* TODO: check if tree->children[0] is a boolean */
}

if (tree->type == AST_FOR) {
/* TODO: check if tree->children[1] and tree->children[2] are numeric */
/* TODO: check if tree->children[0] is a varible compatible with
* tree->children[1] and tree->children[2] */
}

if (tree->type == AST_CALL) {
/* TODO: check if tree->children[0] is a function identifier */
/* TODO: check if tree->children[1] is compatible with the function declaration */
Expand Down

0 comments on commit 7b99770

Please sign in to comment.