単項演算子を実�

This commit is contained in:
otya128 committed 2015-06-07 19:33:51 +09:00
1 parent 978a7a6ee7
commit 628b259caf
5 files changed
+37 -8

No files matched your search

+7
View File
@@ -107,6 +107,13 @@ class Compiler
genCodeOP(binop.operator);
}
break;
case NodeType.UnaryOperator:
{
auto una = cast(UnaryOperator)exp;
compileExpression(una.item);
genCodeOP(una.operator);
}
break;
case NodeType.Variable:
auto var = cast(Variable)exp;
genCodePushGlobal(getGlobalVarIndex(var.name));