Skip to content

ParserContext

ParserContext exposes policy construction and diagnostic services to custom tag visitors.

nextId(): number

nextId returns a monotonically increasing source identifier.

number


parseMatch(options): Match

parseMatch parses a custom rule field as a canonical match.

ParseMatchOptions

Match


parseRule(options): Rule

parseRule parses a custom policy field as a canonical rule.

ParseRuleOptions

Rule


reportErrorAtId(id, message, …args): void

reportErrorAtId records a parser diagnostic.

number

string

…unknown[]

void


stringValue(value, fieldName?): ValueString

stringValue creates a source-associated string value.

unknown

string

ValueString