mirror of
https://github.com/msojocs/wx-compiler.git
synced 2025-07-19 00:00:04 +08:00
fix: $gwx is not a function
This commit is contained in:
parent
72f660ea5a
commit
83c7df85cf
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@ -12,10 +12,10 @@
|
|||||||
"program": "${workspaceFolder}/build/wcc",
|
"program": "${workspaceFolder}/build/wcc",
|
||||||
"args": [
|
"args": [
|
||||||
"\"--config-path\"",
|
"\"--config-path\"",
|
||||||
"\"/mnt/d/Work/WeChatProjects/miniprogram-1/wcc/99a9bac3c05fc25dd070298212c4a7d3\""
|
"\"/mnt/d/Work/WeChatProjects/issue/97/wcc-cmd2.txt\""
|
||||||
],
|
],
|
||||||
"stopAtEntry": false,
|
"stopAtEntry": false,
|
||||||
"cwd": "/mnt/d/Work/WeChatProjects/miniprogram-1",
|
"cwd": "/mnt/d/Work/WeChatProjects/issue/97/ThorUI-applets-vip",
|
||||||
"environment": [],
|
"environment": [],
|
||||||
"externalConsole": false,
|
"externalConsole": false,
|
||||||
"MIMode": "gdb",
|
"MIMode": "gdb",
|
||||||
|
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -57,10 +57,10 @@
|
|||||||
"variant": "cpp"
|
"variant": "cpp"
|
||||||
},
|
},
|
||||||
"cmake.debugConfig": {
|
"cmake.debugConfig": {
|
||||||
"cwd": "/mnt/d/Work/WeChatProjects/issue/91/build",
|
"cwd": "/mnt/d/Work/WeChatProjects/issue/97/ThorUI-applets-vip",
|
||||||
"args": [
|
"args": [
|
||||||
"\"--config-path\"",
|
"\"--config-path\"",
|
||||||
"\"/mnt/d/Work/WeChatProjects/issue/91/cmd/case1-cmd.txt\""
|
"\"/mnt/d/Work/WeChatProjects/issue/97/wcc-cmd2.txt\""
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"cmake.configureSettings": {
|
"cmake.configureSettings": {
|
||||||
|
@ -560,7 +560,7 @@ namespace night
|
|||||||
auto v28 = this->offset_28->next();
|
auto v28 = this->offset_28->next();
|
||||||
auto v37 = this->offset_28->next();
|
auto v37 = this->offset_28->next();
|
||||||
auto v31 = this->offset_28->next();
|
auto v31 = this->offset_28->next();
|
||||||
int v46 = 0;
|
bool v46 = false;
|
||||||
if (v37)
|
if (v37)
|
||||||
{
|
{
|
||||||
if (night::NS_TYPE_VAR == v37->offset_0 || (v46 = night::NS_TYPE_STR == v37->offset_0))
|
if (night::NS_TYPE_VAR == v37->offset_0 || (v46 = night::NS_TYPE_STR == v37->offset_0))
|
||||||
@ -577,7 +577,7 @@ namespace night
|
|||||||
}
|
}
|
||||||
if (night::NS_TYPE_PUNC == v37->offset_0)
|
if (night::NS_TYPE_PUNC == v37->offset_0)
|
||||||
{
|
{
|
||||||
if ("}" == v37->offset_0)
|
if ("}" == v37->offset_60)
|
||||||
{
|
{
|
||||||
v46 = true;
|
v46 = true;
|
||||||
}
|
}
|
||||||
@ -589,7 +589,7 @@ namespace night
|
|||||||
if (v46)
|
if (v46)
|
||||||
{
|
{
|
||||||
auto v11 = this->ast_obj_block();
|
auto v11 = this->ast_obj_block();
|
||||||
LABEL_113:
|
// LABEL_113:
|
||||||
auto v65 = this->make_call_or_just_expression(v11);
|
auto v65 = this->make_call_or_just_expression(v11);
|
||||||
return v65;
|
return v65;
|
||||||
}
|
}
|
||||||
|
@ -149,9 +149,11 @@ namespace WXML
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
int ToAttrContent_i = 0;
|
||||||
std::string Token::ToAttrContent()
|
std::string Token::ToAttrContent()
|
||||||
{
|
{
|
||||||
|
ToAttrContent_i++;
|
||||||
|
int inner_ToAttrContent_i = ToAttrContent_i;
|
||||||
// 有缓存(offset_84),直接返回
|
// 有缓存(offset_84),直接返回
|
||||||
if( this->offset_0.size() == 0 || this->offset_84)
|
if( this->offset_0.size() == 0 || this->offset_84)
|
||||||
return this->offset_88;
|
return this->offset_88;
|
||||||
@ -179,6 +181,7 @@ namespace WXML
|
|||||||
v2 = 1;
|
v2 = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Src[v3] = v4;
|
||||||
}
|
}
|
||||||
else if ( v2 )
|
else if ( v2 )
|
||||||
{
|
{
|
||||||
@ -193,6 +196,10 @@ namespace WXML
|
|||||||
case 'r':
|
case 'r':
|
||||||
Src[v3] = 13; // \r "\\r" -> "\r"
|
Src[v3] = 13; // \r "\\r" -> "\r"
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
Src[v3] = v4;
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3,7 +3,7 @@ namespace WXML
|
|||||||
{
|
{
|
||||||
namespace StringTemplating
|
namespace StringTemplating
|
||||||
{
|
{
|
||||||
|
int Deal_i = 0;
|
||||||
int Deal(
|
int Deal(
|
||||||
char const* Str,
|
char const* Str,
|
||||||
std::string &a2,
|
std::string &a2,
|
||||||
@ -11,6 +11,8 @@ namespace WXML
|
|||||||
bool & a4
|
bool & a4
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Deal_i++;
|
||||||
|
int inner_Deal_i = Deal_i;
|
||||||
int v4 = strlen(Str);
|
int v4 = strlen(Str);
|
||||||
int v5 = 0;
|
int v5 = 0;
|
||||||
int v12 = 0;
|
int v12 = 0;
|
||||||
|
@ -17041,7 +17041,7 @@ _DWORD *__userpurge night::NSASTParse::ast_dispatch@<eax>(_DWORD *a1@<ecx>, nigh
|
|||||||
}
|
}
|
||||||
if ( std::operator==<char>((int)&night::NS_TYPE_PUNC, (int)v37) )
|
if ( std::operator==<char>((int)&night::NS_TYPE_PUNC, (int)v37) )
|
||||||
{
|
{
|
||||||
v9 = std::operator==<char>("}", (int)(v37 + 15));
|
v9 = std::operator==<char>("}", (int)(v37 + 15)); // offset_60
|
||||||
v10 = v46;
|
v10 = v46;
|
||||||
if ( v9 )
|
if ( v9 )
|
||||||
v10 = v9;
|
v10 = v9;
|
||||||
@ -52907,7 +52907,7 @@ LABEL_20:
|
|||||||
++v3;
|
++v3;
|
||||||
v2 = 0;
|
v2 = 0;
|
||||||
Src[v3] = 0;
|
Src[v3] = 0;
|
||||||
if ( v3 == 30 ) // 记录分隔符
|
if ( v3 == 30 ) // 达到30个字符
|
||||||
{
|
{
|
||||||
v10[0] = v11;
|
v10[0] = v11;
|
||||||
std::string::_M_construct<char const*>(v10, Src, (size_t)&Size);
|
std::string::_M_construct<char const*>(v10, Src, (size_t)&Size);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||||
|
|
||||||
cd /mnt/d/Work/WeChatProjects/issue/91/build
|
cd /mnt/d/Work/WeChatProjects/issue/97/ThorUI-applets-vip
|
||||||
|
|
||||||
# list="cmd1 cmd2"
|
# list="cmd1 cmd2"
|
||||||
# for cmd in $list;
|
# for cmd in $list;
|
||||||
@ -11,7 +11,7 @@ cd /mnt/d/Work/WeChatProjects/issue/91/build
|
|||||||
# /root/github/wx-compiler/build/wcc "--config-path" "/mnt/d/Work/disassembly/wcc-exec/wcc/config/$cmd.txt" > /root/github/wx-compiler/test/wcc_linux.json
|
# /root/github/wx-compiler/build/wcc "--config-path" "/mnt/d/Work/disassembly/wcc-exec/wcc/config/$cmd.txt" > /root/github/wx-compiler/test/wcc_linux.json
|
||||||
# /mnt/d/Work/disassembly/wcc-exec/wcc/wcc.exe "--config-path" "d:/Work/disassembly/wcc-exec/wcc/config/$cmd.txt" > /root/github/wx-compiler/test/wcc_win.json
|
# /mnt/d/Work/disassembly/wcc-exec/wcc/wcc.exe "--config-path" "d:/Work/disassembly/wcc-exec/wcc/config/$cmd.txt" > /root/github/wx-compiler/test/wcc_win.json
|
||||||
# done;
|
# done;
|
||||||
filename="issue/91/cmd/case1-cmd.txt"
|
filename="issue/97/wcc-cmd2.txt"
|
||||||
echo "linux:"
|
echo "linux:"
|
||||||
/root/github/wx-compiler/build/wcc "--config-path" "/mnt/d/Work/WeChatProjects/$filename" > /root/github/wx-compiler/test/wcc_linux.json
|
/root/github/wx-compiler/build/wcc "--config-path" "/mnt/d/Work/WeChatProjects/$filename" > /root/github/wx-compiler/test/wcc_linux.json
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user