File tree 2 files changed +12
-6
lines changed
resources/minitscript/tests
src/minitscript/minitscript
2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -21,4 +21,11 @@ function: main()
21
21
end
22
22
console.printLine("\" ABCDEF \"->toLowerCase()->trim(): " + " ABCDEF "->toLowerCase()->trim());
23
23
console.printLine("C:\\msys64\\usr\\bin\\bash -c \"export PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig && ")
24
+ console.printLine(
25
+ "/DEF:" + "linker/Def/File"->replace("/", "\\") +
26
+ " " +
27
+ "$compilationUnits" +
28
+ " " +
29
+ "/OUT:" + "library/DLL/File"->replace("/", "\\")
30
+ )
24
31
end
Original file line number Diff line number Diff line change @@ -2711,9 +2711,9 @@ const string MinitScript::doStatementPreProcessing(const string& processedStatem
2711
2711
for (int i = position; i >= 0 ; i--) {
2712
2712
auto c = statement[i];
2713
2713
auto lc = i > 0 ?statement[i - 1 ]:' \0 ' ;
2714
- if (lc == ' \\ ' && c == ' \\ ' ) lc = ' \0 ' ;
2714
+ auto llc = i > 1 ?statement[i - 2 ]: ' \0 ' ;
2715
2715
//
2716
- if ((c == ' "' || c == ' \' ' ) && lc != ' \\ ' ) {
2716
+ if ((c == ' "' || c == ' \' ' ) && ( lc != ' \\ ' || llc == ' \\ ' ) ) {
2717
2717
if (quote == ' \0 ' ) {
2718
2718
quote = c;
2719
2719
} else
@@ -2780,13 +2780,14 @@ const string MinitScript::doStatementPreProcessing(const string& processedStatem
2780
2780
auto squareBracketCount = 0 ;
2781
2781
auto curlyBracketCount = 0 ;
2782
2782
auto quote = ' \0 ' ;
2783
- auto lc = ' \0 ' ;
2784
2783
string argument;
2785
2784
length = 0 ;
2786
2785
for (auto i = position; i < statement.size (); i++) {
2787
2786
auto c = statement[i];
2787
+ auto lc = i > 0 ?statement[i - 1 ]:' \0 ' ;
2788
+ auto llc = i > 1 ?statement[i - 2 ]:' \0 ' ;
2788
2789
// quote?
2789
- if ((c == ' "' || c == ' \' ' ) && lc != ' \\ ' ) {
2790
+ if ((c == ' "' || c == ' \' ' ) && ( lc != ' \\ ' || llc == ' \\ ' ) ) {
2790
2791
if (quote == ' \0 ' ) {
2791
2792
quote = c;
2792
2793
} else
@@ -2858,8 +2859,6 @@ const string MinitScript::doStatementPreProcessing(const string& processedStatem
2858
2859
argument+= c;
2859
2860
}
2860
2861
length++;
2861
- //
2862
- lc = lc == ' \\ ' && c == ' \\ ' ?' \0 ' :c;
2863
2862
}
2864
2863
//
2865
2864
return trimArgument (argument, removeBrackets);
You can’t perform that action at this time.
0 commit comments