diff options
| author | Ben Winston | 2023-05-21 23:50:04 -0400 |
|---|---|---|
| committer | Ben Winston | 2023-05-21 23:50:04 -0400 |
| commit | 03b4987afc5e32ec560fac6f74c153d592f75259 (patch) | |
| tree | ca29375c89260d7678e7b173bd663327170533f5 /chunk.d | |
| parent | 8e1f84b1369909745859777d07a5e8e74b5df334 (diff) | |
functionsgit add *.d!
Diffstat (limited to 'chunk.d')
| -rw-r--r-- | chunk.d | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 { |
