aboutsummaryrefslogtreecommitdiff
path: root/chunk.d
diff options
context:
space:
mode:
Diffstat (limited to 'chunk.d')
-rw-r--r--chunk.d6
1 files changed, 4 insertions, 2 deletions
diff --git a/chunk.d b/chunk.d
index c512f14..96e4f76 100644
--- a/chunk.d
+++ b/chunk.d
@@ -19,11 +19,11 @@ class Function : Obj {
string name;
ObjType type;
- this(ObjType type) {
+ this(ObjType type, string name = "") {
this.type = type;
this.chunk = new Chunk();
this.arity = 0;
- this.name = "";
+ this.name = name;
}
override string toString() {
@@ -56,6 +56,8 @@ enum OpCode {
OP_JUMP,
OP_JUMP_IF_FALSE,
OP_JUMP_IF_TRUE,
+
+ OP_CALL,
}
class Chunk {