修改费用计算代码
This commit is contained in:
@@ -125,7 +125,7 @@ class ExpressionCalculator:
|
||||
# 处理一元运算符
|
||||
if token_type == "OPERATOR" and value in ("+", "-"):
|
||||
self.current_token += 1
|
||||
node = self.parse_factor()
|
||||
node = self._parse_factor()
|
||||
return ("UNARYOP", value, node)
|
||||
|
||||
# 处理变量
|
||||
|
||||
Reference in New Issue
Block a user