diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-10-17 21:21:12 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-10-17 21:21:12 +0800 |
commit | 518b602b44aff0b4174c3f71b30a17cc6ef9feb7 (patch) | |
tree | 9dd96a9376b87d80ca6b4634267465c1aae561e8 /script/brave | |
parent | 4d360798a9b565c193387d648618837f15e14565 (diff) | |
download | lua-language-server-518b602b44aff0b4174c3f71b30a17cc6ef9feb7.zip |
cleanup
Diffstat (limited to 'script/brave')
-rw-r--r-- | script/brave/work.lua | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/script/brave/work.lua b/script/brave/work.lua index 90ed6f6f..33172d7e 100644 --- a/script/brave/work.lua +++ b/script/brave/work.lua @@ -26,7 +26,7 @@ brave.on('loadFile', function (path) return util.loadFile(path) end) -brave.on('removeCaches', function(path) +brave.on('removeCaches', function (path) local fs = require 'bee.filesystem' local fsu = require 'fs-utility' for dir in fs.pairs(fs.path(path)) do @@ -38,3 +38,25 @@ brave.on('removeCaches', function(path) end end end) + +---@class brave.param.compile +---@field text string +---@field mode string +---@field version string +---@field options brave.param.compile.options + +---@class brave.param.compile.options +---@field special table<string, string> +---@field unicodeName boolean +---@field nonstandardSymbol table<string, true> + +---@param param brave.param.compile +brave.on('compile', function (param) + local parser = require 'parser' + local state, err = parser.compile(param.text + , param.mode + , param.version + , param.options + ) + return state, err +end) |