broken shitty code
This commit is contained in:
parent
e6b20b5aa9
commit
5ec5c64775
28 changed files with 322 additions and 72 deletions
15
Compiler/Parser/Nodes/BinaryOperatorNode.cs
Normal file
15
Compiler/Parser/Nodes/BinaryOperatorNode.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
namespace Compiler.Parser.Nodes
|
||||
{
|
||||
public sealed class BinaryOperatorNode : Node
|
||||
{
|
||||
public override NodeType NodeType { get; set; }
|
||||
|
||||
public OperatorType OperatorType { get; set; }
|
||||
|
||||
public BinaryOperatorNode(OperatorType operatorType)
|
||||
{
|
||||
NodeType = NodeType.BinaryOperatorNode;
|
||||
OperatorType = operatorType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ namespace Compiler.Parser.Nodes
|
|||
|
||||
public ConstantNode(int value)
|
||||
{
|
||||
this.NodeType = NodeType.ConstantNode;
|
||||
NodeType = NodeType.ConstantNode;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@ namespace Compiler.Parser.Nodes
|
|||
ReturnStatementNode,
|
||||
ExpressionNode,
|
||||
ConstantNode,
|
||||
UnaryOperatorNode
|
||||
UnaryOperatorNode,
|
||||
BinaryOperatorNode,
|
||||
TermNode,
|
||||
FactorNode
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -6,5 +6,11 @@ namespace Compiler.Parser.Nodes
|
|||
Negation,
|
||||
BitwiseComplement,
|
||||
LogicalNegation,
|
||||
|
||||
//binary operators
|
||||
Addition,
|
||||
Subtraction,
|
||||
Multiplication,
|
||||
Division
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue