orca-runtime-python 0.1.21__py3-none-any.whl → 0.1.25__py3-none-any.whl
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.
- orca_runtime_python/__init__.py +1 -1
- orca_runtime_python/machine.py +2 -2
- orca_runtime_python/parser.py +12 -0
- orca_runtime_python/types.py +1 -1
- {orca_runtime_python-0.1.21.dist-info → orca_runtime_python-0.1.25.dist-info}/METADATA +1 -1
- orca_runtime_python-0.1.25.dist-info/RECORD +12 -0
- orca_runtime_python-0.1.21.dist-info/RECORD +0 -12
- {orca_runtime_python-0.1.21.dist-info → orca_runtime_python-0.1.25.dist-info}/WHEEL +0 -0
- {orca_runtime_python-0.1.21.dist-info → orca_runtime_python-0.1.25.dist-info}/top_level.txt +0 -0
orca_runtime_python/__init__.py
CHANGED
orca_runtime_python/machine.py
CHANGED
|
@@ -717,10 +717,10 @@ class OrcaMachine:
|
|
|
717
717
|
"""Resolve a ValueRef to its Python value."""
|
|
718
718
|
return ref.value
|
|
719
719
|
|
|
720
|
-
def _eval_compare(self, op: str, left: VariableRef, right: ValueRef) -> bool:
|
|
720
|
+
def _eval_compare(self, op: str, left: VariableRef, right: "ValueRef | VariableRef") -> bool:
|
|
721
721
|
"""Evaluate a comparison guard."""
|
|
722
722
|
lhs = self._resolve_variable(left)
|
|
723
|
-
rhs = self._resolve_value(right)
|
|
723
|
+
rhs = self._resolve_variable(right) if isinstance(right, VariableRef) else self._resolve_value(right)
|
|
724
724
|
|
|
725
725
|
# Try numeric comparison
|
|
726
726
|
try:
|
orca_runtime_python/parser.py
CHANGED
|
@@ -556,6 +556,14 @@ def _parse_guard_expression(input_str: str) -> GuardExpression:
|
|
|
556
556
|
return GuardNot(expr=parse_primary())
|
|
557
557
|
return parse_primary()
|
|
558
558
|
|
|
559
|
+
def _lookahead_is_var_path() -> bool:
|
|
560
|
+
"""Check if current position starts a variable path (ident.ident...)."""
|
|
561
|
+
return (
|
|
562
|
+
pos[0] + 1 < len(tokens)
|
|
563
|
+
and tokens[pos[0]].type == "ident"
|
|
564
|
+
and tokens[pos[0] + 1].type == "dot"
|
|
565
|
+
)
|
|
566
|
+
|
|
559
567
|
def parse_primary() -> GuardExpression:
|
|
560
568
|
tok = peek()
|
|
561
569
|
|
|
@@ -593,6 +601,10 @@ def _parse_guard_expression(input_str: str) -> GuardExpression:
|
|
|
593
601
|
# Comparison operator
|
|
594
602
|
if peek().type == "op":
|
|
595
603
|
op = advance().value
|
|
604
|
+
# RHS: variable path (ctx.foo) or literal value
|
|
605
|
+
if peek().type == "ident" and _lookahead_is_var_path():
|
|
606
|
+
right_ref = parse_var_path()
|
|
607
|
+
return GuardCompare(op=_map_op(op), left=var_path, right=right_ref)
|
|
596
608
|
right = parse_value()
|
|
597
609
|
# Special case: != null and == null
|
|
598
610
|
if right.type == "null":
|
orca_runtime_python/types.py
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
orca_runtime_python/__init__.py,sha256=72lz085_ZdaZnEizGbB0DATdV_frmMz3hqdfb_ZwrBk,1290
|
|
2
|
+
orca_runtime_python/bus.py,sha256=kCdMwm3O97wlX5hr3_aK-YkhABO7Z0M-eaYPYJAIa9g,7171
|
|
3
|
+
orca_runtime_python/effects.py,sha256=eAkm2JdHSH5wUm8ZQjBf7ncgMI1iw7xq9bKi5X1AJEM,5649
|
|
4
|
+
orca_runtime_python/logging.py,sha256=Bnw_PCGlMQaDbti3UNMudhj0RcOckF_7YYt_5yWatGY,4360
|
|
5
|
+
orca_runtime_python/machine.py,sha256=V_Z4kA7cG_ImYLE4Ys8aIqXuMRnaMsTPbqhRz0LYeyA,36057
|
|
6
|
+
orca_runtime_python/parser.py,sha256=SC6YYQstJ9Jn2kuPuBsOPXsnn1m0ZDJ0dSS6AyUbW0M,33250
|
|
7
|
+
orca_runtime_python/persistence.py,sha256=rjrgXDhfs3IA-c_xkQcFC4lCBlzmQtLL5lNWGu2kWu4,3330
|
|
8
|
+
orca_runtime_python/types.py,sha256=Pzso9IfR_yPWGluqydj5dFbM3mS1rJ3x3czCW6XP5zc,7275
|
|
9
|
+
orca_runtime_python-0.1.25.dist-info/METADATA,sha256=AVau6uaBfSgtPdfaJTmKukbiHwnJDc8sdFp9E63b4JE,7165
|
|
10
|
+
orca_runtime_python-0.1.25.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
11
|
+
orca_runtime_python-0.1.25.dist-info/top_level.txt,sha256=r7KIKsP_6Io6KiMqlBoNEc4IwzaE7O3VTG-PSEu0wVY,20
|
|
12
|
+
orca_runtime_python-0.1.25.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
orca_runtime_python/__init__.py,sha256=wBa4uI4nU8-wafXM3rex4qHZdCqO24LtSqVGr_kSdMU,1289
|
|
2
|
-
orca_runtime_python/bus.py,sha256=kCdMwm3O97wlX5hr3_aK-YkhABO7Z0M-eaYPYJAIa9g,7171
|
|
3
|
-
orca_runtime_python/effects.py,sha256=eAkm2JdHSH5wUm8ZQjBf7ncgMI1iw7xq9bKi5X1AJEM,5649
|
|
4
|
-
orca_runtime_python/logging.py,sha256=Bnw_PCGlMQaDbti3UNMudhj0RcOckF_7YYt_5yWatGY,4360
|
|
5
|
-
orca_runtime_python/machine.py,sha256=tGcukHSCfBGKwJDxKO7vaU_dymCg9Zcpma--_KbBVvE,35972
|
|
6
|
-
orca_runtime_python/parser.py,sha256=CDhdzU_GgJneBhuNPGyF45Ywa_Mk9w0VVnmQobBSyCk,32709
|
|
7
|
-
orca_runtime_python/persistence.py,sha256=rjrgXDhfs3IA-c_xkQcFC4lCBlzmQtLL5lNWGu2kWu4,3330
|
|
8
|
-
orca_runtime_python/types.py,sha256=Sy1FUG9kCJREQLIWytsTw6uvPdpZOeR9b3bkSvXMzd4,7259
|
|
9
|
-
orca_runtime_python-0.1.21.dist-info/METADATA,sha256=4HUsF34-vxKboAFgTbsAOyvJjiL3JCtnHsUZh_bcEt0,7165
|
|
10
|
-
orca_runtime_python-0.1.21.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
11
|
-
orca_runtime_python-0.1.21.dist-info/top_level.txt,sha256=r7KIKsP_6Io6KiMqlBoNEc4IwzaE7O3VTG-PSEu0wVY,20
|
|
12
|
-
orca_runtime_python-0.1.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|