ParserContext
ParserContext exposes policy construction and diagnostic services to custom tag visitors.
Methods
Section titled “Methods”nextId()
Section titled “nextId()”nextId():
number
nextId returns a monotonically increasing source identifier.
Returns
Section titled “Returns”number
parseMatch()
Section titled “parseMatch()”parseMatch(
options):Match
parseMatch parses a custom rule field as a canonical match.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”parseRule()
Section titled “parseRule()”parseRule(
options):Rule
parseRule parses a custom policy field as a canonical rule.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”reportErrorAtId()
Section titled “reportErrorAtId()”reportErrorAtId(
id,message, …args):void
reportErrorAtId records a parser diagnostic.
Parameters
Section titled “Parameters”number
message
Section titled “message”string
…unknown[]
Returns
Section titled “Returns”void
stringValue()
Section titled “stringValue()”stringValue(
value,fieldName?):ValueString
stringValue creates a source-associated string value.
Parameters
Section titled “Parameters”unknown
fieldName?
Section titled “fieldName?”string