mirror of
https://github.com/msojocs/wx-compiler.git
synced 2025-07-19 00:00:04 +08:00
fix: 修复错误
This commit is contained in:
parent
8e9a6a0490
commit
16bcfacd79
@ -206,7 +206,7 @@ namespace WXML
|
||||
/* data */
|
||||
std::string fileContent;
|
||||
std::string fileName;
|
||||
WXML::DOMLib::Machine machine; // this + 2
|
||||
WXML::DOMLib::Machine machine; // this->offset_8
|
||||
public:
|
||||
Tokenizer(char const* fileContent, std::string const& filePath);
|
||||
Tokenizer(/* args */);
|
||||
|
@ -26,7 +26,7 @@ namespace WXML{
|
||||
bool b1, // mark指定运算结果是否非0 a12
|
||||
bool b2) // mark指定运算结果是否非0 a13
|
||||
{
|
||||
int pResult;
|
||||
int pResult = 0;
|
||||
bool isWxml = filePath.substr(filePath.length() - 5) == ".wxml";
|
||||
if (isWxml)
|
||||
{
|
||||
@ -235,6 +235,10 @@ namespace WXML{
|
||||
(mark & 4) != 0, // a11 -> mark a12
|
||||
(mark & 0x20) != 0); // a13
|
||||
// printf("parse result: %d", parseResult);
|
||||
if (parseResult)
|
||||
{
|
||||
return parseResult;
|
||||
}
|
||||
}
|
||||
// mark - 5
|
||||
std::shared_ptr<std::stringstream> v301_localCommonStream1(new std::stringstream()); // v301
|
||||
@ -295,7 +299,7 @@ namespace WXML{
|
||||
for (auto j: i.second)
|
||||
{
|
||||
info << j << " ";
|
||||
if (v304.find( j) == v304.end())
|
||||
if (v304.find(j) == v304.end())
|
||||
{
|
||||
errorMessage = "WXML file not found: " + j;
|
||||
return -1152;
|
||||
|
@ -8,6 +8,7 @@ namespace WXML
|
||||
Tokenizer::Tokenizer(char const* fileContent, std::string const& filePath)
|
||||
{
|
||||
this->fileContent = std::string(fileContent);
|
||||
this->fileContent.resize(this->fileContent.size() + 1);
|
||||
this->fileName = filePath;
|
||||
WXML::DOMLib::Machine m(filePath);
|
||||
this->machine = m;
|
||||
|
Loading…
x
Reference in New Issue
Block a user