parseRuleSyntax(syntax, indexMap, foreignCallNameToID): object

Parses the rule syntax and converts it into an abstract syntax tree (AST) and instruction set.

Parameters

ParameterTypeDescription
syntaxruleJSONThe JSON representation of the rule syntax.
indexMaptrackerIndexNameMapping[]A mapping of tracker IDs to their names and types.
foreignCallNameToIDFCNameToID[]-

Returns

object

An object containing the instruction set, raw data, positive effects, negative effects, placeholders, and effect placeholders.

effectPlaceHolders

effectPlaceHolders: PlaceholderStruct[]

instructionSet

instructionSet: any[] = retVal.instructionSet

negativeEffects

negativeEffects: object[] = negativeEffectsFinal

placeHolders

placeHolders: PlaceholderStruct[]

positiveEffects

positiveEffects: object[] = positiveEffectsFinal

rawData

rawData: RawData = raw

Defined in

src/modules/parser.ts:50