parseForeignCalls(condition, names, foreignCallNameToID): string

Parses a condition string to identify and process foreign call (FC) expressions. Replaces each FC expression with a unique placeholder and updates the names array with metadata about the processed expressions.

Parameters

ParameterTypeDescription
conditionstringThe input condition string containing potential FC expressions.
namesany[]An array to store metadata about the processed FC expressions, including their placeholders, indices, and types.
foreignCallNameToIDFCNameToID[]-

Returns

string

The updated condition string with FC expressions replaced by placeholders.

Remarks

  • FC expressions are identified using the regular expression /FC:[a-zA-Z]+[^\s]+/g.
  • If an FC expression is already present in the names array, its existing placeholder is reused.
  • Each new FC expression is assigned a unique placeholder in the format FC:<index>.

Defined in

src/parsing/parsing-utilities.ts:198