diff options
author | CppCXY <812125110@qq.com> | 2021-10-28 19:28:25 +0800 |
---|---|---|
committer | CppCXY <812125110@qq.com> | 2021-10-28 19:28:25 +0800 |
commit | 47ec2b92bba5eafe248bf65956d0651d7030b302 (patch) | |
tree | 5a609eb656d5e4fc0d92e3fbfeaa4425b4124919 /make | |
parent | 661b3802681bc68308fbb32937914845ff999532 (diff) | |
download | lua-language-server-47ec2b92bba5eafe248bf65956d0651d7030b302.zip |
集成code_format
Diffstat (limited to 'make')
-rw-r--r-- | make/code_style.lua | 36 | ||||
-rw-r--r-- | make/modules.cpp | 3 |
2 files changed, 39 insertions, 0 deletions
diff --git a/make/code_style.lua b/make/code_style.lua new file mode 100644 index 00000000..44bd14c9 --- /dev/null +++ b/make/code_style.lua @@ -0,0 +1,36 @@ +local lm = require "luamake" + +lm:static_library 'luaParser' { + rootdir = '../3rd/EmmyLuaCodeStyle', + includes = "include", + sources = "LuaParser/src/*.cpp", + defines = { + 'MAXRECLEVEL=1000', + }, +} + +lm:static_library 'codeService' { + deps = {"luaParser"}, + rootdir = '../3rd/EmmyLuaCodeStyle', + includes = "include", + sources = { + "CodeService/src/*.cpp", + "CodeService/src/FormatElement/*.cpp" + }, + defines = { + 'MAXRECLEVEL=1000', + }, +} + +lm:static_library 'codeFormatLib' { + deps = {"codeService"}, + rootdir = '../3rd/EmmyLuaCodeStyle', + includes = { + "include", + "../bee.lua/3rd/lua" + }, + sources = "CodeFormatLib/src/*.cpp", + defines = { + 'MAXRECLEVEL=1000', + }, +}
\ No newline at end of file diff --git a/make/modules.cpp b/make/modules.cpp index f72fc058..46e99032 100644 --- a/make/modules.cpp +++ b/make/modules.cpp @@ -2,3 +2,6 @@ extern "C" int luaopen_lpeglabel (lua_State *L); static ::bee::lua::callfunc _init(::bee::lua::register_module, "lpeglabel", luaopen_lpeglabel); + +extern "C" int luaopen_code_format(lua_State *L); +static ::bee::lua::callfunc _init_code_format(::bee::lua::register_module, "code_format", luaopen_code_format);
\ No newline at end of file |