Implement USE/EXEC compilation

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

No files matched your search

+22 -1
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;
}
}