Added Parser
- can parse a basic token list to an AST
This commit is contained in:
parent
ea26acce4a
commit
b3fe78fffb
19 changed files with 451 additions and 88 deletions
14
Compiler/Parser/Nodes/ConstantNode.cs
Normal file
14
Compiler/Parser/Nodes/ConstantNode.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
namespace Compiler.Parser.Nodes
|
||||
{
|
||||
public sealed class ConstantNode : Node
|
||||
{
|
||||
public override NodeType NodeType { get; set; }
|
||||
public int value { get; set; }
|
||||
|
||||
public ConstantNode(int value)
|
||||
{
|
||||
this.NodeType = NodeType.ExpressionNode;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue