Remove IsUnary() and IsBinary()

- This information is already stored in the node's NodeType field, so
  there's no reason to go do a table lookup for it elsewhere. Must have
  been a brain fart when I wrote them in the first place.
This commit is contained in:
Randy Heit 2013-11-01 21:28:00 -05:00
commit b66de4116d
4 changed files with 57 additions and 70 deletions

View file

@ -226,11 +226,11 @@ PSymbolConst *ZCCCompiler::CompileConstant(ZCC_ConstantDef *def)
ZCC_Expression *ZCCCompiler::Simplify(ZCC_Expression *root)
{
if (IsUnaryOp(root->Operation))
if (root->NodeType == AST_ExprUnary)
{
return SimplifyUnary(static_cast<ZCC_ExprUnary *>(root));
}
else if (IsBinaryOp(root->Operation))
else if (root->NodeType == AST_ExprBinary)
{
return SimplifyBinary(static_cast<ZCC_ExprBinary *>(root));
}