solpl 2.3.6__tar.gz → 2.3.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {solpl-2.3.6/solpl.egg-info → solpl-2.3.7}/PKG-INFO +1 -1
- {solpl-2.3.6 → solpl-2.3.7}/interpreter/sol.py +5 -2
- {solpl-2.3.6 → solpl-2.3.7}/pyproject.toml +1 -1
- {solpl-2.3.6 → solpl-2.3.7/solpl.egg-info}/PKG-INFO +1 -1
- {solpl-2.3.6 → solpl-2.3.7}/LICENSE +0 -0
- {solpl-2.3.6 → solpl-2.3.7}/README.md +0 -0
- {solpl-2.3.6 → solpl-2.3.7}/setup.cfg +0 -0
- {solpl-2.3.6 → solpl-2.3.7}/solpl.egg-info/SOURCES.txt +0 -0
- {solpl-2.3.6 → solpl-2.3.7}/solpl.egg-info/dependency_links.txt +0 -0
- {solpl-2.3.6 → solpl-2.3.7}/solpl.egg-info/entry_points.txt +0 -0
- {solpl-2.3.6 → solpl-2.3.7}/solpl.egg-info/top_level.txt +0 -0
|
@@ -45,7 +45,8 @@ class SolInterpreter:
|
|
|
45
45
|
|
|
46
46
|
def _compute(self, expr):
|
|
47
47
|
expr = str(expr).strip()
|
|
48
|
-
|
|
48
|
+
is_literal = (expr.startswith('"') and expr.endswith('"')) or (expr.startswith("'") and expr.endswith("'"))
|
|
49
|
+
if "+" in expr and not is_literal and any(c.isalpha() or c in ['"', "'"] for c in expr):
|
|
49
50
|
parts = expr.split("+")
|
|
50
51
|
result = ""
|
|
51
52
|
for p in parts:
|
|
@@ -148,7 +149,9 @@ class SolInterpreter:
|
|
|
148
149
|
def get_val(expr):
|
|
149
150
|
val = self._compute(expr.strip())
|
|
150
151
|
return val if val is not None else 0
|
|
151
|
-
|
|
152
|
+
if "==" in cond:
|
|
153
|
+
left, right = cond.split("==", 1)
|
|
154
|
+
return get_val(left) == get_val(right)
|
|
152
155
|
if "=" in cond:
|
|
153
156
|
left, right = cond.split("=")
|
|
154
157
|
return get_val(left) == get_val(right)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|