Skip to content

Commit 50842a0

Browse files
committed
提供屏蔽filesystem的能力
1 parent 32b9949 commit 50842a0

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,8 @@ jobs:
2828
sudo apt-get install -y gcc-11 g++-11
2929
echo "CC=gcc-11" >> $GITHUB_ENV
3030
echo "CXX=g++-11" >> $GITHUB_ENV
31-
- name: Build-macosx
32-
if:
33-
run: |
34-
mkdir build
35-
cd build
36-
cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
37-
cmake --build . --config Release
38-
ctest -V -C Release
39-
cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/
40-
4131

4232
- name: Build-Release
43-
4433
run: |
4534
mkdir build
4635
cd build

CodeService/src/LuaCodeStyleOptions.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "CodeService/LuaCodeStyleOptions.h"
2-
#include <filesystem>
32
#include "CodeService/FormatElement/MinLineElement.h"
43
#include "CodeService/FormatElement/KeepLineElement.h"
54
#include "CodeService/NameStyle/NameStyleRuleMatcher.h"

CodeService/src/LuaEditorConfig.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
#include <fstream>
44
#include <vector>
55
#include <regex>
6+
#ifndef NOT_SUPPORT_FILE_SYSTEM
67
#include <filesystem>
8+
#endif
79
#include "Util/StringUtil.h"
810
#include "CodeService/FormatElement/KeepElement.h"
911
#include "CodeService/FormatElement/MinLineElement.h"
@@ -112,7 +114,7 @@ std::shared_ptr<LuaCodeStyleOptions> LuaEditorConfig::Generate(std::string_view
112114
}
113115
}
114116
}
115-
#ifndef NOT_SURPPORT_FILE_SYSTEM
117+
#ifndef NOT_SUPPORT_FILE_SYSTEM
116118
// [lib/**.lua]
117119
else if (StringUtil::EndWith(sectionPattern, "**.lua"))
118120
{

LuaParser/src/LuaParser.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#include "LuaParser/LuaParser.h"
22
#include <fstream>
33
#include <sstream>
4-
#include <filesystem>
54
#include "LuaDefine.h"
65
#include "LuaParser/LuaTokenTypeDetail.h"
76
#include "LuaParser/LuaOperatorType.h"
87
#include "Util/format.h"
98
#include "LuaParser/LuaParseException.h"
109
#include "LuaParser/LuaFile.h"
1110

11+
#ifndef NOT_SUPPORT_FILE_SYSTEM
12+
#include <filesystem>
1213
using namespace std::filesystem;
14+
#endif
1315

1416
std::shared_ptr<LuaParser> LuaParser::LoadFromFile(std::string_view filename)
1517
{
@@ -105,7 +107,7 @@ bool LuaParser::IsEmptyLine(int line)
105107

106108
void LuaParser::SetFilename(std::string_view filename)
107109
{
108-
#ifdef NOT_SURPPORT_FILE_SYSTEM
110+
#ifdef NOT_SUPPORT_FILE_SYSTEM
109111
_file->SetFilename(filename);
110112
#else
111113
std::filesystem::path path(filename);

0 commit comments

Comments
 (0)