Inheritance diagram for aplp.TokenMarker:

Public Member Functions | |
| Token | markTokens (Segment line, int lineIndex) |
| boolean | supportsMultilineTokens () |
| void | insertLines (int index, int lines) |
| void | deleteLines (int index, int lines) |
| int | getLineCount () |
| boolean | isNextLineRequested () |
Protected Member Functions | |
| abstract byte | markTokensImpl (byte token, Segment line, int lineIndex) |
| TokenMarker () | |
| void | ensureCapacity (int index) |
| void | addToken (int length, byte id) |
Protected Attributes | |
| Token | firstToken |
| Token | lastToken |
| LineInfo[] | lineInfo |
| int | length |
| int | lastLine |
| boolean | nextLineRequested |
Classes | |
| class | LineInfo |
For performance reasons, the linked list of tokens is reused after each line is tokenized. Therefore, the return value of markTokens should only be used for immediate painting. Notably, it cannot be cached.
|
|
Creates a new |
|
||||||||||||
|
Adds a token to the token list.
|
|
||||||||||||
|
Informs the token marker that line have been deleted from the document. This removes the lines in question from the
|
|
|
Ensures that the
It should be unnecessary to call this under normal circumstances;
|
|
|
Returns the number of lines in this token marker. |
|
||||||||||||
|
Informs the token marker that lines have been inserted into the document. This inserts a gap in the
|
|
|
Returns true if the next line should be repainted. This will return true after a line has been tokenized that starts a multiline token that continues onto the next line. |
|
||||||||||||
|
A wrapper for the lower-level
|
|
||||||||||||||||
|
An abstract method that splits a line up into tokens. It should parse the line, and call For example if the current line contains the start of a multiline comment that doesn't end on that line, this method should return the comment token type so that it continues on the next line.
Implemented in aplp.APLTokenMarker. |
|
|
Returns if the token marker supports tokens that span multiple lines. If this is true, the object using this token marker is required to pass all lines in the document to the The default implementation returns true; it should be overridden to return false on simpler token markers for increased speed. |
|
|
The first token in the list. This should be used as the return value from |
|
|
The last tokenized line. |
|
|
The last token in the list. New tokens are added here. This should be set to null before a new line is to be tokenized. |
|
|
The number of lines in the model being tokenized. This can be less than the length of the |
|
|
An array for storing information about lines. It is enlarged and shrunk automatically by the |
|
|
True if the next line should be painted. |
1.4.5