diff options
| author | Mel <einebeere@gmail.com> | 2022-07-27 11:01:29 +0000 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-07-27 11:01:29 +0000 |
| commit | 22a69393f58abcf3bcf9e7039f994dae78422213 (patch) | |
| tree | 6f88f586bd57d298d54e345a6c4b8d7144a5d2ec /pkg/lang/vm/value/value.go | |
| parent | 45b6f073fe398e820e9e4a82900bc282ee32af9b (diff) | |
| download | jinx-22a69393f58abcf3bcf9e7039f994dae78422213.tar.zst jinx-22a69393f58abcf3bcf9e7039f994dae78422213.zip | |
Implement VM modules and globals
Diffstat (limited to 'pkg/lang/vm/value/value.go')
| -rw-r--r-- | pkg/lang/vm/value/value.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/lang/vm/value/value.go b/pkg/lang/vm/value/value.go index 5dd5012..b051f04 100644 --- a/pkg/lang/vm/value/value.go +++ b/pkg/lang/vm/value/value.go @@ -1,6 +1,7 @@ package value import ( + "jinx/pkg/lang/vm/code" "jinx/pkg/lang/vm/mem" ) @@ -52,8 +53,8 @@ func NewNull() Value { return Value{t: CORE_TYPE_NULL, d: NullData{}} } -func NewFunction(pc int, args uint) Value { - return Value{t: CORE_TYPE_FUNCTION, d: FunctionData{pc: pc, args: args}} +func NewFunction(pos code.Pos, args uint) Value { + return Value{t: CORE_TYPE_FUNCTION, d: FunctionData{pos: pos, args: args}} } func NewNativeFunction(f NativeFunc, args uint) Value { |
