diff options
m--------- | 3rd/bee.lua | 0 | ||||
m--------- | 3rd/rcedit | 0 | ||||
-rw-r--r-- | azure-pipelines.yml | 25 | ||||
-rw-r--r-- | client/package-lock.json | 5 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | server/locale/en-US/script.lni | 1 | ||||
-rw-r--r-- | server/locale/zh-CN/script.lni | 1 | ||||
-rw-r--r-- | server/src/emmy/manager.lua | 2 | ||||
-rw-r--r-- | server/src/parser/ast.lua | 16 | ||||
-rw-r--r-- | server/test/build_package.lua | 2 | ||||
-rw-r--r-- | server/test/full/normal.lua | 4 |
11 files changed, 34 insertions, 24 deletions
diff --git a/3rd/bee.lua b/3rd/bee.lua -Subproject bf26876818af3ab1a06f828d78076de6ffef546 +Subproject 81c51d11c28f58ee47d31da95999c0e88f9f038 diff --git a/3rd/rcedit b/3rd/rcedit -Subproject 6daf749a38b9017e37033d2dce453e66f91d9ab +Subproject 3a8e8239daade0c1cecffed75246ccfcca72103 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 03a77760..44535c1b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,61 +2,60 @@ trigger: - master jobs: -- job: windows_msvc +- job: windows pool: - name: Hosted VS2017 + vmImage: 'windows-latest' steps: - script: | git submodule update --init --recursive - displayName: '拉取子模块' + displayName: 'Init' - script: | cd 3rd\luamake tools\ninja.exe -f ninja\msvc.ninja cd ..\.. - displayName: 'PreCompile' + displayName: 'Compile luamake' - script: | 3rd\luamake\luamake.exe rebuild displayName: 'Compile' - job: macos pool: - name: Hosted macOS + vmImage: 'macos-latest' steps: - bash: | git submodule update --init --recursive - displayName: '拉取子模块' + displayName: 'Init' - bash: | sudo xcode-select -s /Applications/Xcode_10.2.app brew install ninja - displayName: '安装ninja' + displayName: 'Install' - bash: | cd 3rd/luamake ninja -f ninja/macos.ninja cd ../.. - displayName: 'PreCompile' + displayName: 'Compile luamake' - bash: | ./3rd/luamake/luamake rebuild displayName: 'Compile' - job: linux pool: - name: Hosted Ubuntu 1604 + vmImage: 'ubuntu-latest' steps: - bash: | git submodule update --init --recursive - displayName: '拉取子模块' + displayName: 'Init' - bash: | - sudo apt-get update sudo apt-get install -y libreadline-dev ninja-build - displayName: '安装ninja' + displayName: 'Install' - bash: | cd 3rd/luamake ninja -f ninja/linux.ninja cd ../.. - displayName: 'PreCompile' + displayName: 'Compile luamake' - bash: | ./3rd/luamake/luamake rebuild displayName: 'Compile' diff --git a/client/package-lock.json b/client/package-lock.json index 053e01a0..d1859fe4 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -158,11 +158,6 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "diff": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", - "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==" - }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", diff --git a/package.json b/package.json index 00d01514..89e6dfdc 100644 --- a/package.json +++ b/package.json @@ -306,5 +306,5 @@ "scripts": { "vscode:prepublish": "cd client && npm run update-vscode && cd .." }, - "version": "0.10.2" + "version": "0.10.3" }
\ No newline at end of file diff --git a/server/locale/en-US/script.lni b/server/locale/en-US/script.lni index 39256be4..ca6c3120 100644 --- a/server/locale/en-US/script.lni +++ b/server/locale/en-US/script.lni @@ -61,6 +61,7 @@ PARSER_UNSUPPORT_SYMBOL = '{version} does not support this grammar.' PARSER_UNEXPECT_DOTS = 'Cannot use `...` outside a vararg function.' PARSER_UNKNOWN_TAG = 'Unknown tag.' PARSER_MULTI_TAG = 'Dose not support multi tags.' +PARSER_UNEXPECT_LFUNC_NAME = 'Local function can only use identifiers as name.' SYMBOL_ANONYMOUS = '<Anonymous>' diff --git a/server/locale/zh-CN/script.lni b/server/locale/zh-CN/script.lni index e1f775ef..ed15ddf0 100644 --- a/server/locale/zh-CN/script.lni +++ b/server/locale/zh-CN/script.lni @@ -61,6 +61,7 @@ PARSER_UNSUPPORT_SYMBOL = '{version} 不支持该符号。' PARSER_UNEXPECT_DOTS = '`...`只能在不定参函数中使用。' PARSER_UNKNOWN_TAG = '不支持的标签。' PARSER_MULTI_TAG = '只能设置一个标签。' +PARSER_UNEXPECT_LFUNC_NAME = '局部函数只能使用标识符作为名称。' SYMBOL_ANONYMOUS = '<匿名函数>' diff --git a/server/src/emmy/manager.lua b/server/src/emmy/manager.lua index 658fb56b..9b6978b9 100644 --- a/server/src/emmy/manager.lua +++ b/server/src/emmy/manager.lua @@ -147,7 +147,7 @@ function mt:addParam(source, bind) paramObj:bindGeneric(bind) else paramObj:bindType(bind) - self:eachClass(bind:getName(), function (class) + self:eachClass(bind:getType(), function (class) if class.type == 'emmy.alias' then class:eachEnum(function (enum) paramObj:addEnum(enum) diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index f2486fd6..e307f8b8 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -2,6 +2,7 @@ local tonumber = tonumber local string_char = string.char local utf8_char = utf8.char local type = type +local table = table local Errs local State @@ -625,6 +626,15 @@ local Defs = { if obj.argFinish > obj.finish then obj.argFinish = obj.finish end + + if name.type ~= 'name' then + pushError { + type = 'UNEXPECT_LFUNC_NAME', + start = name.start, + finish = name.finish, + } + end + return obj end, Table = function (start, ...) @@ -696,10 +706,10 @@ local Defs = { local last = list[#list] list.finish = last.finish return list - elseif first == '' then - return nil - else + elseif type(first) == 'table' then return first + else + return nil end end, ArgList = function (...) diff --git a/server/test/build_package.lua b/server/test/build_package.lua index 9c6b6859..9006e2c5 100644 --- a/server/test/build_package.lua +++ b/server/test/build_package.lua @@ -1,7 +1,7 @@ local json = require 'json' local diagDefault = require 'constant.DiagnosticDefaultSeverity' -local VERSION = "0.10.2" +local VERSION = "0.10.3" local package = { name = "lua", diff --git a/server/test/full/normal.lua b/server/test/full/normal.lua index 3de45c51..facc0139 100644 --- a/server/test/full/normal.lua +++ b/server/test/full/normal.lua @@ -146,3 +146,7 @@ TEST [[ function scene:selectByCylinder(center, radius, height) end ]] + +TEST [[ +local x = , +]] |