Skip to content
Snippets Groups Projects
Commit 307d7108 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Implement custom variable definitions

-) Implement custom definitions (Variable or Definition as keyword) of the form:
    Variable|Definition=VARNAME; [Value=]SOMECOMPLEXVALUE
-) Such defined variables can be used in all further rules.
-) Add "Condition=" keyword to indicate that a certain value is a condition (e.g. a variable defined as implemented here).
   This is needed to distinguish single-variable (or function-call) conditions from shipping costs, where the "Shipping=" was left out.
   Previously, only terms that contained a comparison operator were detected to be conditions. This excluded conditions like
   "issubset(...)" or "MyZIPConditions" (i.e. functions returning boolean values and boolean values stored in variables).
-) The rule-matching code was moved to its own function, so the logic to distinguish variable definitions and (later on) modifiers
   is in only one place.
parent c7964557
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment