Grammar that tokenizes lines of text.
This class should not be instantiated directly but instead obtained from a GrammarRegistry by calling GrammarRegistry::loadGrammar.
Invoke the given callback when this grammar is updated due to a grammar it depends on being added or removed from the registry.
Argument | Description |
---|---|
|
Function to call when this grammar is updated. |
Return values |
---|
Returns a Disposable on which |
Tokenize the line of text.
Argument | Description |
---|---|
|
A String of text to tokenize. |
|
An optional Array of rules previously returned from this method. This should be null when tokenizing the first line in the file. |
|
A optional Boolean denoting whether this is the first line in the file which defaults to |
Return values |
---|
Returns an Object containing the following properties:
|