Decoding simple files with functions and assignments is now possible

This commit is contained in:
Michael Hansen
2009-07-27 00:23:49 +00:00
parent b89ae8b2ac
commit 03042b7e23
12 changed files with 330 additions and 180 deletions

View File

@@ -2,6 +2,31 @@
PycRef<ASTNode> Node_NULL = (ASTNode*)0;
/* ASTNodeList */
void ASTNodeList::removeLast()
{
list_t::iterator it = m_nodes.end();
--it;
m_nodes.erase(it);
}
void ASTNodeList::removeFirst()
{
list_t::iterator it = m_nodes.begin();
m_nodes.erase(it);
}
/* ASTBinary */
const char* ASTBinary::op_str() const
{
static const char* s_op_strings[] = {
"**", "*", "/", "%", "+", "-", "<<", ">>", "&", "^", "|"
};
return s_op_strings[op()];
}
/* ASTCompare */
const char* ASTCompare::op_str() const
{
@@ -9,5 +34,5 @@ const char* ASTCompare::op_str() const
"<", "<=", "==", "!=", ">", ">=", "in", "not in", "is", "is not",
"<EXCEPTION MATCH>", "<BAD>"
};
return s_cmp_strings[m_op];
return s_cmp_strings[op()];
}