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:
parent
16fc9be411
commit
b66de4116d
4 changed files with 57 additions and 70 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue