Add raise, break, continue, and a hacky attempt at for loops.

for loops currently generate a core dump.
This commit is contained in:
Darryl Pogue
2011-01-01 02:31:31 -08:00
parent 7e4de4e612
commit f1205548e5
4 changed files with 179 additions and 9 deletions

View File

@@ -21,7 +21,7 @@ void ASTNodeList::removeFirst()
const char* ASTUnary::op_str() const
{
static const char* s_op_strings[] = {
"+", "-", "~", "not ", "`"
"+", "-", "~", "not "
};
return s_op_strings[op()];
}
@@ -50,6 +50,17 @@ const char* ASTCompare::op_str() const
return s_cmp_strings[op()];
}
/* ASTKeyword */
const char* ASTKeyword::word_str() const
{
static const char* s_word_strings[] = {
"break", "continue"
};
return s_word_strings[key()];
}
/* ASTBlock */
void ASTBlock::removeLast()
{