public final class StructuredSyntaxDocumentFilter.LexerNode
extends Object
Regex-driven lexer node that applies styles and nested lexers.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Style |
getDefaultStyle()Returns the fallback style for unmatched text. |
|
public boolean |
isInitialized()
|
|
public void |
parse(CharBuffer buffer, int offset, int length)Parses the supplied buffer and applies styles to matching ranges. |
|
public void |
putChild(String regexp, LexerNode node)Registers a child lexer for matches of the supplied expression. |
|
public void |
putChild(String[] regexps, LexerNode node)Registers a child lexer for matches of any supplied expression. |
|
public void |
putStyle(String regexp, Style style)Associates a style with matches of the supplied expression. |
|
public void |
putStyle(String[] regexps, Style style)Associates a style with matches of any supplied expression. |
|
public void |
removeChild(String regexp)Removes the child lexer registered for the supplied expression. |
|
public void |
removeStyle(String regexp)Removes the style associated with the supplied expression. |
|
public void |
removeStyle(String[] regexps)Removes the style associated with any of the supplied expressions. |
|
public void |
setDefaultStyle(Style style)Sets the fallback style for unmatched text. |
Returns the fallback style for unmatched text.
Parses the supplied buffer and applies styles to matching ranges.
buffer - the character buffer to parseoffset - the starting offsetlength - the number of characters to parseRegisters a child lexer for matches of the supplied expression.
regexp - the expression to matchnode - the child lexer to apply within matching textRegisters a child lexer for matches of any supplied expression.
regexps - the expressions to matchnode - the child lexer to apply within matching textAssociates a style with matches of the supplied expression.
regexp - the expression to matchstyle - the style to applyAssociates a style with matches of any supplied expression.
regexps - the expressions to matchstyle - the style to applyRemoves the child lexer registered for the supplied expression.
regexp - the expression whose child lexer should be removedRemoves the style associated with the supplied expression.
regexp - the expression whose style should be removedRemoves the style associated with any of the supplied expressions.
regexps - the expressions whose combined style should be removedSets the fallback style for unmatched text.
style - the default style to use