1
0

Add VAR(expr)=expr parsing

This commit is contained in:
otya128
2016-12-08 22:16:17 +09:00
parent 0a4fea51f5
commit 879d28c9bf
2 changed files with 45 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ enum NodeType
Option,
Swap,
AssignRef,
VarRef,
}
abstract class Node
{
@@ -620,3 +621,13 @@ class Swap : Statement
this.item2 = item2;
}
}
class VarRef : Expression
{
Expression expression;
this(Expression expr, SourceLocation loc)
{
super.location = loc;
this.type = NodeType.VarRef;
this.expression = expression;
}
}