| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ if(APPLE) | |||
| 22 | 22 | endif () | |
| 23 | 23 | ||
| 24 | 24 | add_subdirectory(LuaParser) | |
| 25 | - add_subdirectory(CodeService) | ||
| 25 | + add_subdirectory(CodeFormatCore) | ||
| 26 | 26 | add_subdirectory(Util) | |
| 27 | 27 | ||
| 28 | 28 | if(BuildAsLuaLib) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,23 +1,22 @@ | |||
| 1 | - cmake_minimum_required(VERSION 3.11) | ||
| 1 | + cmake_minimum_required(VERSION 3.14) | ||
| 2 | 2 | ||
| 3 | 3 | project(CodeFormat) | |
| 4 | 4 | ||
| 5 | - add_executable(CodeFormat ../include/CodeService/Format/Analyzer/FormatDocAnalyze.h) | ||
| 5 | + add_executable(CodeFormat) | ||
| 6 | 6 | ||
| 7 | 7 | add_dependencies(CodeFormat CodeService Util) | |
| 8 | 8 | ||
| 9 | - target_include_directories(CodeFormat PUBLIC | ||
| 10 | - ${LuaCodeStyle_SOURCE_DIR}/include | ||
| 9 | + target_include_directories(CodeFormat PRIVATE | ||
| 11 | 10 | src | |
| 12 | 11 | ) | |
| 13 | 12 | ||
| 14 | 13 | target_sources(CodeFormat | |
| 15 | - PUBLIC | ||
| 16 | - ${CodeFormat_SOURCE_DIR}/src/CodeFormat.cpp | ||
| 17 | - ${CodeFormat_SOURCE_DIR}/src/LuaFormat.cpp | ||
| 14 | + PRIVATE | ||
| 15 | + src/CodeFormat.cpp | ||
| 16 | + src/LuaFormat.cpp | ||
| 18 | 17 | ) | |
| 19 | 18 | ||
| 20 | - target_link_libraries(CodeFormat CodeService Util) | ||
| 19 | + target_link_libraries(CodeFormat PUBLIC CodeService Util) | ||
| 21 | 20 | ||
| 22 | 21 | if(CMAKE_SYSTEM_NAME STREQUAL Linux) | |
| 23 | 22 | target_link_libraries(CodeFormat -static-libstdc++ -static-libgcc) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,15 +3,15 @@ | |||
| 3 | 3 | #include <fstream> | |
| 4 | 4 | #include <sstream> | |
| 5 | 5 | #include "Util/format.h" | |
| 6 | - #include "CodeService/Config/LuaEditorConfig.h" | ||
| 6 | + #include "CodeFormatCore/Config/LuaEditorConfig.h" | ||
| 7 | 7 | #include "Util/StringUtil.h" | |
| 8 | 8 | #include "LuaParser/File/LuaFile.h" | |
| 9 | 9 | #include "LuaParser/Types/TextRange.h" | |
| 10 | 10 | #include "LuaParser/Lexer/LuaLexer.h" | |
| 11 | 11 | #include "LuaParser/Ast/LuaSyntaxTree.h" | |
| 12 | - #include "CodeService/Format/FormatBuilder.h" | ||
| 12 | + #include "CodeFormatCore/Format/FormatBuilder.h" | ||
| 13 | 13 | #include "LuaParser/Parse/LuaParser.h" | |
| 14 | - #include "CodeService/Diagnostic/DiagnosticBuilder.h" | ||
| 14 | + #include "CodeFormatCore/Diagnostic/DiagnosticBuilder.h" | ||
| 15 | 15 | #include "Util/FileFinder.h" | |
| 16 | 16 | #include "Util/Url.h" | |
| 17 | 17 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,11 +5,11 @@ | |||
| 5 | 5 | #include <filesystem> | |
| 6 | 6 | #include <cstring> | |
| 7 | 7 | #include <optional> | |
| 8 | - #include "CodeService/Config/LuaStyle.h" | ||
| 8 | + #include "CodeFormatCore/Config/LuaStyle.h" | ||
| 9 | 9 | #include "LuaParser/File/LuaFile.h" | |
| 10 | 10 | #include "LuaParser/Types/TextRange.h" | |
| 11 | 11 | #include "Types.h" | |
| 12 | - #include "CodeService/Config/LuaDiagnosticStyle.h" | ||
| 12 | + #include "CodeFormatCore/Config/LuaDiagnosticStyle.h" | ||
| 13 | 13 | ||
| 14 | 14 | class LuaFormat { | |
| 15 | 15 | public: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | 3 | #include <string_view> | |
| 4 | 4 | #include <memory> | |
| 5 | - #include "CodeService/Config/LuaEditorConfig.h" | ||
| 5 | + #include "CodeFormatCore/Config/LuaEditorConfig.h" | ||
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | 8 | struct LuaConfig { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,60 @@ | |||
| 1 | + cmake_minimum_required(VERSION 3.14) | ||
| 2 | + | ||
| 3 | + project(CodeService) | ||
| 4 | + | ||
| 5 | + add_library(CodeService STATIC) | ||
| 6 | + | ||
| 7 | + add_dependencies(CodeService LuaParser Util) | ||
| 8 | + | ||
| 9 | + target_include_directories(CodeService | ||
| 10 | + PUBLIC | ||
| 11 | + include | ||
| 12 | + PRIVATE | ||
| 13 | + src | ||
| 14 | + ) | ||
| 15 | + | ||
| 16 | + target_sources(CodeService | ||
| 17 | + PRIVATE | ||
| 18 | + # config | ||
| 19 | + src/Config/FunctionOption.cpp | ||
| 20 | + src/Config/LuaStyle.cpp | ||
| 21 | + src/Config/LuaEditorConfig.cpp | ||
| 22 | + src/Config/LuaDiagnosticStyle.cpp | ||
| 23 | + src/Config/LanguageTranslator.cpp | ||
| 24 | + src/Config/EditorconfigPattern.cpp | ||
| 25 | + | ||
| 26 | + # format | ||
| 27 | + src/Format/FormatBuilder.cpp | ||
| 28 | + src/Format/FormatState.cpp | ||
| 29 | + src/Format/Analyzer/FormatAnalyzer.cpp | ||
| 30 | + src/Format/Analyzer/SpaceAnalyzer.cpp | ||
| 31 | + src/Format/Analyzer/IndentationAnalyzer.cpp | ||
| 32 | + src/Format/Analyzer/LineBreakAnalyzer.cpp | ||
| 33 | + src/Format/Analyzer/FormatDocAnalyze.cpp | ||
| 34 | + src/Format/Analyzer/AlignAnalyzer.cpp | ||
| 35 | + src/Format/Analyzer/TokenAnalyzer.cpp | ||
| 36 | + src/Format/Analyzer/FormatResolve.cpp | ||
| 37 | + src/Format/Analyzer/SyntaxNodeHelper.cpp | ||
| 38 | + # rangeFormat | ||
| 39 | + src/RangeFormat/RangeFormatBuilder.cpp | ||
| 40 | + # typeFormat | ||
| 41 | + src/TypeFormat/LuaTypeFormat.cpp | ||
| 42 | + src/TypeFormat/LuaTypeFormatOptions.cpp | ||
| 43 | + # diagnostic | ||
| 44 | + src/Diagnostic/DiagnosticBuilder.cpp | ||
| 45 | + # diagnostic/nameStyle | ||
| 46 | + src/Diagnostic/NameStyle/NameStyleChecker.cpp | ||
| 47 | + src/Diagnostic/NameStyle/NameStyleRuleMatcher.cpp | ||
| 48 | + # diagnostic/spell | ||
| 49 | + src/Diagnostic/Spell/CodeSpellChecker.cpp | ||
| 50 | + src/Diagnostic/Spell/IdentifyParser.cpp | ||
| 51 | + src/Diagnostic/Spell/TextParser.cpp | ||
| 52 | + # diagnostic/codestyle | ||
| 53 | + src/Diagnostic/CodeStyle/CodeStyleChecker.cpp | ||
| 54 | + ) | ||
| 55 | + | ||
| 56 | + if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") | ||
| 57 | + target_compile_options(CodeService PUBLIC /utf-8) | ||
| 58 | + endif () | ||
| 59 | + | ||
| 60 | + target_link_libraries(CodeService LuaParser Util) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments