parseForeignCalls(Parses a condition string to identify and process foreign call (FC) expressions. Replaces each FC expression with a unique placeholder and updates thecondition
,names
,foreignCallNameToID
,indexMap
,additionalForeignCalls
): [string
,RuleComponent
[]]
names
array
with metadata about the processed expressions.
Parameter | Type | Description |
---|---|---|
condition | string | The input condition string containing potential FC expressions. |
names | any [] | An array to store metadata about the processed FC expressions, including their placeholders, indices, and types. |
foreignCallNameToID | FCNameToID [] | An array mapping foreign call names to their corresponding IDs. |
indexMap | FCNameToID [] | - |
additionalForeignCalls | string [] | - |
string
, RuleComponent
[]]
The updated condition string with FC expressions replaced by placeholders
and an array of created ForeignCall
/FC:[a-zA-Z]+[^\s]+/g
.names
array, its existing placeholder
is reused.FC:<getRandom()>
.