summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorCppCXY <812125110@qq.com>2021-10-28 19:28:25 +0800
committerCppCXY <812125110@qq.com>2021-10-28 19:28:25 +0800
commit47ec2b92bba5eafe248bf65956d0651d7030b302 (patch)
tree5a609eb656d5e4fc0d92e3fbfeaa4425b4124919 /make
parent661b3802681bc68308fbb32937914845ff999532 (diff)
downloadlua-language-server-47ec2b92bba5eafe248bf65956d0651d7030b302.zip
集成code_format
Diffstat (limited to 'make')
-rw-r--r--make/code_style.lua36
-rw-r--r--make/modules.cpp3
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