Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
vslinko committed May 14, 2024
1 parent 4c6ca87 commit 3faa594
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,11 @@ def __init__(self, script, program, obj):

def _evaluate_check(self, check):
key = check.key.value
current_value = self._obj[key].lower()
op = check.op.value
value = check.value.value
param = check.value.value.lower()
if op == ":starts_with":
return self._obj[key].startswith(value.lower())
return current_value.startswith(param)
raise ParsingError(self._script, check.op.pos, f"Unknown operator: {op}")

def _evaluate_if_statement(self, if_statement):
Expand Down

0 comments on commit 3faa594

Please sign in to comment.