forgot to replace in transpile.py
This commit is contained in:
@@ -54,7 +54,7 @@ def transpile(tokens: list[Token], isPickUpPhase: bool = False, transpiled_expre
|
||||
section_start = True
|
||||
section_open_paranthesis_count = 0
|
||||
|
||||
# print("tokens", tokens)
|
||||
print("tokens", tokens)
|
||||
# print("detokenize", Lexer().detokenize(tokens))
|
||||
|
||||
for i, token in enumerate(tokens):
|
||||
@@ -72,8 +72,10 @@ def transpile(tokens: list[Token], isPickUpPhase: bool = False, transpiled_expre
|
||||
if tokens[i + 1].type != TokenType.ValueNTIPAliasFlag:
|
||||
expression += token_value
|
||||
case TokenType.EQ:
|
||||
if tokens[i + 1].type == TokenType.ValueNTIPAliasFlag: continue
|
||||
if isPickUpPhase and tokens[i + 1].type == TokenType.ValueNTIPAliasIDName: continue
|
||||
if tokens[i + 1].type == TokenType.ValueNTIPAliasFlag:
|
||||
continue
|
||||
if isPickUpPhase and tokens[i + 1].type == TokenType.ValueNTIPAliasIDName:
|
||||
continue
|
||||
expression += "=="
|
||||
case TokenType.OR | TokenType.AND | TokenType.LPAREN | TokenType.RPAREN | TokenType.PLUS | TokenType.MINUS | TokenType.MULTIPLY | TokenType.DIVIDE:
|
||||
expression += token_value
|
||||
@@ -86,7 +88,7 @@ def transpile(tokens: list[Token], isPickUpPhase: bool = False, transpiled_expre
|
||||
section_open_paranthesis_count -= 1
|
||||
expression += "and"
|
||||
section_start = True
|
||||
case TokenType.ValueNTIPAliasStat:
|
||||
case TokenType.KeywordNTIPAliasStat:
|
||||
expression += "(int(item_data.get('NTIPAliasStat', {})" + f".get('{token_value}', 0)))"
|
||||
case TokenType.KeywordNTIPAliasIDName:
|
||||
if not isPickUpPhase:
|
||||
|
||||
Reference in New Issue
Block a user