summaryrefslogtreecommitdiff
path: root/script-beta/vm/getValue.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/vm/getValue.lua')
-rw-r--r--script-beta/vm/getValue.lua30
1 files changed, 20 insertions, 10 deletions
diff --git a/script-beta/vm/getValue.lua b/script-beta/vm/getValue.lua
index 30fd00aa..9ad9e86b 100644
--- a/script-beta/vm/getValue.lua
+++ b/script-beta/vm/getValue.lua
@@ -97,6 +97,11 @@ local function checkLiteral(source)
source = source,
}
end
+ elseif source.type == 'integer' then
+ return alloc {
+ type = 'integer',
+ source = source,
+ }
elseif source.type == 'table' then
return alloc {
type = 'table',
@@ -107,6 +112,11 @@ local function checkLiteral(source)
type = 'function',
source = source,
}
+ elseif source.type == '...' then
+ return alloc {
+ type = '...',
+ source = source,
+ }
end
end
@@ -536,7 +546,7 @@ local function checkLibrary(source)
return alloc {
type = lib.type,
value = lib.value,
- source = vm.librarySource(lib),
+ source = lib,
}
end
@@ -573,7 +583,7 @@ local function checkLibraryReturn(source)
return alloc {
type = rtn.type,
value = rtn.value,
- source = vm.librarySource(rtn),
+ source = rtn,
}
end
@@ -614,7 +624,7 @@ local function checkLibraryArg(source)
return alloc {
type = arg.type,
value = arg.value,
- source = vm.librarySource(arg),
+ source = arg,
}
end
@@ -630,21 +640,21 @@ local function inferByUnary(results, source)
if op.type == '#' then
insert(results, {
type = 'string',
- source = vm.librarySource(source)
+ source = source
})
insert(results, {
type = 'table',
- source = vm.librarySource(source)
+ source = source
})
elseif op.type == '~' then
insert(results, {
type = 'integer',
- source = vm.librarySource(source)
+ source = source
})
elseif op.type == '-' then
insert(results, {
type = 'number',
- source = vm.librarySource(source)
+ source = source
})
end
end
@@ -670,7 +680,7 @@ local function inferByBinary(results, source)
or op.type == '%' then
insert(results, {
type = 'number',
- source = vm.librarySource(source)
+ source = source
})
elseif op.type == '|'
or op.type == '~'
@@ -681,12 +691,12 @@ local function inferByBinary(results, source)
or op.type == '//' then
insert(results, {
type = 'integer',
- source = vm.librarySource(source)
+ source = source
})
elseif op.type == '..' then
insert(results, {
type = 'string',
- source = vm.librarySource(source)
+ source = source
})
end
end