Class RXBuild.Dom.Node
Abstract base class for all matching nodes in the regexps DOM tree
Defined in: regex_dom_node.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
A unique (in the regexp) numeric ID for this item
|
|
The node to match following the current instance
|
|
An array of tokens from the input stream that created this instance
|
Method Attributes | Method Name and Description |
---|---|
Accept(visitor)
Makes the visitor explore the current instance
|
|
Adds all tokens passed in all arguments to the tokens property of this instance
|
|
AppendAtEnd(newLast)
Adds the provided RXBuild.Dom.Node to the end of this items sibling chain
|
|
buildGrammarDiagram(container)
|
|
Returns a human readable description of this match and its following matches
|
|
Used to display this nodes HTML in an interactive way to the user - to be rewritten
|
|
Returns a human readable description of this match
|
|
GetHtml()
Returns an HTML description of this match (Must be overriden - this returns a fat error)
|
|
Used to display this nodes HTML in an interactive way to the user - to be rewritten
|
|
GetLast()
Finds and returns the last item in the chain starting from the current instance
|
|
Used to display this nodes HTML in an interactive way to the user - to be rewritten
|
|
<static> |
RXBuild.Dom.Node.NodeRegExTokenHighlight(tokenlist)
Used to display this nodes HTML in an interactive way to the user - to be rewritten
|
RunForAll(func, param)
Calls RunOnMe on each node in this instances chain
|
|
RunOnMe(func, param)
Visits this node with the provided visitor
|
|
StartVisit(visitor)
Makes the visitor explore the current instance and all followers
|
Field Detail
{Number}
id
A unique (in the regexp) numeric ID for this item
{RXBuild.Dom.Node}
next
The node to match following the current instance
{regex_parser.TokenInfo[]}
tokens
An array of tokens from the input stream that created this instance
Method Detail
{Boolean}
Accept(visitor)
Makes the visitor explore the current instance
- Parameters:
- {RXBuild.DOM.NodeVisitor} visitor
- The visitor object
- Returns:
- {Boolean} The return value of the visitor
AddTokens()
Adds all tokens passed in all arguments to the tokens property of this instance
- Parameters:
- {regex_parser.TokenInfo} ...
- Tokens to include in this instance
AppendAtEnd(newLast)
Adds the provided RXBuild.Dom.Node to the end of this items sibling chain
- Parameters:
- {RXBuild.Dom.Node} newLast
- The node to append.
buildGrammarDiagram(container)
Defined in: regex_syntax_diagram.js.
- Parameters:
- container
{String}
GetChainDescription()
Returns a human readable description of this match and its following matches
- Returns:
- {String} The description of this node and the following in human readable format.
GetChainHtml()
Used to display this nodes HTML in an interactive way to the user - to be rewritten
{String}
GetDescription()
Returns a human readable description of this match
- Returns:
- {String} The description of this node in human readable format.
{String}
GetHtml()
Returns an HTML description of this match (Must be overriden - this returns a fat error)
- Returns:
- {String} An HTML description of this match
GetHtmlOpenTag()
Used to display this nodes HTML in an interactive way to the user - to be rewritten
{RXBuild.Dom.Node}
GetLast()
Finds and returns the last item in the chain starting from the current instance
- Returns:
- {RXBuild.Dom.Node} The last node in this nodes siblings
GetTokenHighlightJS()
Used to display this nodes HTML in an interactive way to the user - to be rewritten
<static>
RXBuild.Dom.Node.NodeRegExTokenHighlight(tokenlist)
Used to display this nodes HTML in an interactive way to the user - to be rewritten
- Parameters:
- tokenlist
{object}
RunForAll(func, param)
Calls RunOnMe on each node in this instances chain
- Parameters:
- {Function} func
- The function to call with each node as first parameter
- {object} param
- The second parameter to func
- Returns:
- {object} Whatever func returned for this instance
{object}
RunOnMe(func, param)
Visits this node 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 last returned
{Boolean}
StartVisit(visitor)
Makes the visitor explore the current instance and all followers
- Parameters:
- {RXBuild.DOM.NodeVisitor} visitor
- The visitor object
- Returns:
- {Boolean} False, if the visit was cancelled by the visitor