Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MatchResult

Extension of TreeNode that allows convenient addition before or after a node, without updating the node's value.

Hierarchy

Index

Properties

Optional $children

$children: TreeNode[]

Children of the node if it's a non-terminal

Readonly $name

$name: string

Name of the node, available in path expressions

Optional Readonly $offset

$offset: number

Offset from 0 in the file, if available

Optional $parent

$parent: TreeNode

Used to evaluate ancestor and other such predicates efficiently. If not available, backup resolution will attempt to navigate from document root if available.

Optional $value

$value: string

Value. If this is a terminal node, its own value, which will always be available. If it's a non-terminal, the value is not guaranteed to be available. If it is, it will be the text from the offset to the end of the last token. This preserves white space between non-terminals.

sourceLocation

sourceLocation: SourceLocation

Methods

append

  • append(content: string): void

evaluateExpression

  • evaluateExpression(pex: string | PathExpression): ExecutionResult

prepend

  • prepend(content: string): void

replace

zap

Generated using TypeDoc