Add raise, break, continue, and a hacky attempt at for loops.
for loops currently generate a core dump.
This commit is contained in:
13
ASTNode.cpp
13
ASTNode.cpp
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user