convertHumanReadableToInstructionSet(syntax, names, indexMap, existingPlaceHolders): InstructionSet

Interprets a given syntax string into an instruction set and placeholders.

This function processes a syntax string by constructing an Abstract Syntax Tree (AST), splitting it based on logical operators (AND/OR), and recursively iterating over the tree to generate an instruction set. It also handles placeholders and maps indices for tracking.

Parameters

ParameterTypeDescription
syntaxstringThe input syntax string to be interpreted.
namesany[]An array of names used in the instruction set.
indexMaptrackerIndexNameMapping[]A mapping of tracker indices to names.
existingPlaceHoldersPlaceholderStruct[]An array of existing placeholders to be considered.

Returns

InstructionSet

An object containing:

  • instructionSet: The generated instruction set based on the input syntax.
  • placeHolders: The placeholders used in the instruction set.

Defined in

src/parsing/internal-parsing-logic.ts:53