corrected implementation of unary operators
This commit is contained in:
parent
202c1d2ca2
commit
07079366b8
6 changed files with 156 additions and 117 deletions
|
|
@ -7,7 +7,7 @@ namespace Compiler.Parser.Nodes
|
|||
|
||||
public ConstantNode(int value)
|
||||
{
|
||||
this.NodeType = NodeType.ExpressionNode;
|
||||
this.NodeType = NodeType.ConstantNode;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ namespace Compiler.Parser.Nodes
|
|||
FunctionNode,
|
||||
ReturnStatementNode,
|
||||
ExpressionNode,
|
||||
ConstantNode,
|
||||
UnaryOperatorNode
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ namespace Compiler.Parser.Nodes
|
|||
public UnaryOperatorNode(OperatorType operatorType)
|
||||
{
|
||||
OperatorType = operatorType;
|
||||
NodeType = NodeType.ExpressionNode;
|
||||
NodeType = NodeType.UnaryOperatorNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue