solpl 2.3.0__tar.gz → 2.3.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: solpl
3
- Version: 2.3.0
3
+ Version: 2.3.5
4
4
  Summary: Sol Programming Language Interpreter
5
5
  Requires-Python: >=3.7
6
6
  License-File: LICENSE
@@ -144,15 +144,19 @@ class SolInterpreter:
144
144
  self.threads.append(t)
145
145
 
146
146
  def _evaluate_condition(self, cond):
147
+ def get_val(expr):
148
+ val = self._compute(expr.strip())
149
+ return val if val is not None else 0
150
+
147
151
  if "=" in cond:
148
152
  left, right = cond.split("=")
149
- return self._compute(left.strip()) == self._compute(right.strip())
153
+ return get_val(left) == get_val(right)
150
154
  elif "<" in cond:
151
155
  left, right = cond.split("<")
152
- return self._compute(left.strip()) < self._compute(right.strip())
156
+ return get_val(left) < get_val(right)
153
157
  elif ">" in cond:
154
158
  left, right = cond.split(">")
155
- return self._compute(left.strip()) > self._compute(right.strip())
159
+ return get_val(left) > get_val(right)
156
160
  return False
157
161
 
158
162
  def _get_block_end(self, start_pc):
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "solpl"
7
- version = "2.3.0"
7
+ version = "2.3.5"
8
8
  description = "Sol Programming Language Interpreter"
9
9
  requires-python = ">=3.7"
10
10
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: solpl
3
- Version: 2.3.0
3
+ Version: 2.3.5
4
4
  Summary: Sol Programming Language Interpreter
5
5
  Requires-Python: >=3.7
6
6
  License-File: LICENSE
File without changes
File without changes
File without changes
File without changes