Registry containing one or more grammars.
Invoke the given callback when a grammar is added to the registry.
Argument | Description |
---|---|
|
Function to call when a grammar is added. |
|
Grammar that was added. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when a grammar is updated due to a grammar it depends on being added or removed from the registry.
Argument | Description |
---|---|
|
Function to call when a grammar is updated. |
|
Grammar that was updated. |
Return values |
---|
Returns a Disposable on which |
Invoke the given callback when a grammar is removed from the registry.
Argument | Description |
---|---|
|
Function to call when a grammar is removed. |
|
Grammar that was removed. |
Return values |
---|
Returns a Disposable on which |
Add a grammar to this registry.
A ‘grammar-added’ event is emitted after the grammar is added.
Argument | Description |
---|---|
|
The Grammar to add. This should be a value previously returned from ::readGrammar or ::readGrammarSync. |
Return values |
---|
Returns a Disposable on which |
Read a grammar asynchronously but don’t add it to the registry.
Argument | Description |
---|---|
|
A String absolute file path to a grammar file. |
|
A Function to call when read with the following arguments: |
|
An Error, may be null. |
|
A Grammar or null if an error occured. |
Return values |
---|
Returns undefined. |
Read a grammar asynchronously and add it to the registry.
Argument | Description |
---|---|
|
A String absolute file path to a grammar file. |
|
A Function to call when loaded with the following arguments: |
|
An Error, may be null. |
|
A Grammar or null if an error occured. |
Return values |
---|
Returns undefined. |