1
0

Implement USE/EXEC compilation

This commit is contained in:
otya128
2016-12-23 17:16:38 +09:00
parent 0b9fd70bcb
commit 0440c33184
4 changed files with 59 additions and 3 deletions

View File

@@ -48,6 +48,8 @@ enum NodeType
VarRef,
XOn,
XOff,
Exec,
Use,
}
abstract class Node
{
@@ -653,4 +655,23 @@ class XOff : Statement
this.func = func;
}
}
class Exec : Statement
{
Expression expression;
this(Expression e, SourceLocation loc)
{
super.location = loc;
expression = e;
this.type = NodeType.Exec;
}
}
class Use : Statement
{
Expression expression;
this(Expression e, SourceLocation loc)
{
super.location = loc;
expression = e;
this.type = NodeType.Use;
}
}