mirror of
https://github.com/msojocs/wx-compiler.git
synced 2025-07-19 00:00:04 +08:00
fix: docker中编译的bug
This commit is contained in:
parent
c770d0a758
commit
2db605d015
@ -75,7 +75,7 @@ namespace WXML
|
|||||||
private:
|
private:
|
||||||
/* data */
|
/* data */
|
||||||
public:
|
public:
|
||||||
bool offset_0;
|
bool offset_0 = false;
|
||||||
std::string offset_4;
|
std::string offset_4;
|
||||||
Token(/* args */);
|
Token(/* args */);
|
||||||
~Token();
|
~Token();
|
||||||
|
@ -32,7 +32,10 @@ namespace WXML {
|
|||||||
{
|
{
|
||||||
if (!this->offset_0.count(s))
|
if (!this->offset_0.count(s))
|
||||||
{
|
{
|
||||||
this->offset_0[s] = this->offset_0.size();
|
// Note: 不能合成一行,否则数量会错误(比实际值大1)
|
||||||
|
int size = this->offset_0.size();
|
||||||
|
this->offset_0[s] = size;
|
||||||
|
// this->offset_0[s] = this->offset_0.size(); // 会导致size的值比实际大1
|
||||||
this->offset_24.push_back(s);
|
this->offset_24.push_back(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -42,6 +45,7 @@ namespace WXML {
|
|||||||
int result = -1;
|
int result = -1;
|
||||||
if(this->offset_0.count(s))
|
if(this->offset_0.count(s))
|
||||||
{
|
{
|
||||||
|
// printf("GetStrID: %s, size: %d\n", s.data(), this->offset_0[s]);
|
||||||
return this->offset_0[s];
|
return this->offset_0[s];
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -1498,7 +1498,9 @@ namespace WXML {
|
|||||||
std::string attr = this->offset_48[v13].ToAttrContent();
|
std::string attr = this->offset_48[v13].ToAttrContent();
|
||||||
if(!this->offset_248->offset_0.count(attr))
|
if(!this->offset_248->offset_0.count(attr))
|
||||||
{
|
{
|
||||||
this->offset_248->offset_0[attr] = this->offset_248->offset_0.size();
|
// Note: 不能合成一行,否则数量会错误
|
||||||
|
int size = this->offset_248->offset_0.size();
|
||||||
|
this->offset_248->offset_0[attr] = size;
|
||||||
this->offset_248->offset_24.push_back(attr);
|
this->offset_248->offset_24.push_back(attr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ namespace WXML
|
|||||||
Table num;
|
Table num;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: 逻辑待验证
|
*
|
||||||
*/
|
*/
|
||||||
int accept(int *a1, uint8_t a2[266], int &a3, char const *a4)
|
int accept(int *a1, uint8_t a2[266], int &a3, char const *a4)
|
||||||
{
|
{
|
||||||
@ -41,7 +41,7 @@ namespace WXML
|
|||||||
a4++;
|
a4++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((char *)a2)[v7])
|
if (a2[v7])
|
||||||
{
|
{
|
||||||
a3 = i;
|
a3 = i;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user