Class RXBuild.Dom.RepeatedMatch
Extends
RXBuild.Dom.Node.
Represents a repeated match in a regular expression, such as with the operators *, ?, + and {}
Defined in: regex_dom.js.
Constructor Attributes | Constructor Name and Description |
---|---|
RXBuild.Dom.RepeatedMatch(subMatch, numMin, numMax, greedy)
|
Field Attributes | Field Name and Description |
---|---|
Whether the match is greedy
|
|
The maximum number of acceptable matches (or -1 for no upper limit)
|
|
The minimum number of times the match should run
|
|
The inner match to repeat
|
- Fields borrowed from class RXBuild.Dom.Node:
- id, next, tokens
Method Attributes | Method Name and Description |
---|---|
Accept(visitor)
Recursively visits this node
|
|
buildGrammarDiagramBox(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 subMatch with the provided visitor
|
- Methods borrowed from class RXBuild.Dom.Node:
- AddTokens, AppendAtEnd, buildGrammarDiagram, GetChainDescription, GetChainHtml, GetHtmlOpenTag, GetLast, GetTokenHighlightJS, NodeRegExTokenHighlight, RunForAll, StartVisit
Class Detail
RXBuild.Dom.RepeatedMatch(subMatch, numMin, numMax, greedy)
- Parameters:
- {RXBuild.Dom.Node} subMatch
- The inner match to repeat
- {Number} numMin
- The minimum number of times the match should run
- {Number} numMax
- The maximum number of acceptable matches (or -1 for no upper limit)
- {Boolean} greedy
- Whether the match is greedy
Field Detail
{Boolean}
isGreedy
Whether the match is greedy
{Number}
maxMatches
The maximum number of acceptable matches (or -1 for no upper limit)
{Number}
minMatches
The minimum number of times the match should run
{RXBuild.Dom.Node}
subMatch
The inner match to repeat
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.
buildGrammarDiagramBox(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 subMatch 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