Class RXBuild.Dom.AlternativeMatch
Extends
RXBuild.Dom.Node.
The AlternativeMatch class matches exactly one of its children
Defined in: regex_dom.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
The list of acceptable matches
|
- Fields borrowed from class RXBuild.Dom.Node:
- id, next, tokens
Method Attributes | Method Name and Description |
---|---|
Accept(visitor)
Recursively visits this node
|
|
AddAlternative(alt)
Adds an alternative match to the collection of acceptable matches
|
|
buildGrammarDiagram(container)
|
|
Returns a human readable description of this match
|
|
GetHtml(excludeChildren)
Returns an HTML description of this match
|
|
RunOnMe(func, param)
Visits this node and its alternatives with the provided visitor
|
- Methods borrowed from class RXBuild.Dom.Node:
- AddTokens, AppendAtEnd, GetChainDescription, GetChainHtml, GetHtmlOpenTag, GetLast, GetTokenHighlightJS, NodeRegExTokenHighlight, RunForAll, StartVisit
Field Detail
{RXBuild.Dom.Node[]}
alternatives
The list of acceptable matches
Method Detail
{Boolean}
Accept(visitor)
Recursively visits this node
- Parameters:
- {RXBuild.Dom.NodeVisitor} visitor
- The visitor currently exploring the DOM
- Returns:
- {Boolean} The last result of the visitors calls.
AddAlternative(alt)
Adds an alternative match to the collection of acceptable matches
- Parameters:
- {RXBuild.Dom.Node} alt
- The acceptable match to add
buildGrammarDiagram(container)
Defined in: regex_syntax_diagram.js.
- Parameters:
- container
{String}
GetDescription()
Returns a human readable description of this match
- Returns:
- {String} The description of this node in human readable format.
{String}
GetHtml(excludeChildren)
Returns an HTML description of this match
- Parameters:
- excludeChildren
- Returns:
- {String} An HTML description of this match
{object}
RunOnMe(func, param)
Visits this node and its alternatives with the provided visitor
- Parameters:
- {Function} func
- The function to call with each node as first parameter
- {object} param
- The second parameter to func
- Returns:
- {object} Whatever func when called on the current instance