@codingame/monaco-vscode-textmate-service-override 3.1.1 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-textmate-service-override",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,11 +18,10 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@3.
|
|
22
|
-
"vscode-marked": "npm:marked@=3.0.2",
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@3.2.0",
|
|
23
22
|
"vscode-oniguruma": "1.7.0",
|
|
24
23
|
"vscode-textmate": "9.0.0",
|
|
25
|
-
"@codingame/monaco-vscode-files-service-override": "3.
|
|
24
|
+
"@codingame/monaco-vscode-files-service-override": "3.2.0"
|
|
26
25
|
},
|
|
27
26
|
"exports": {
|
|
28
27
|
".": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ServiceIdentifier } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
2
|
-
import { IGrammar } from '
|
|
2
|
+
import { IGrammar } from 'vscode-textmate';
|
|
3
3
|
|
|
4
4
|
declare const ITextMateTokenizationService: ServiceIdentifier<ITextMateTokenizationService>;
|
|
5
5
|
interface ITextMateTokenizationService {
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A grammar
|
|
3
|
-
*/
|
|
4
|
-
interface IGrammar {
|
|
5
|
-
/**
|
|
6
|
-
* Tokenize `lineText` using previous line state `prevState`.
|
|
7
|
-
*/
|
|
8
|
-
tokenizeLine(lineText: string, prevState: StateStack | null, timeLimit?: number): ITokenizeLineResult;
|
|
9
|
-
/**
|
|
10
|
-
* Tokenize `lineText` using previous line state `prevState`.
|
|
11
|
-
* The result contains the tokens in binary format, resolved with the following information:
|
|
12
|
-
* - language
|
|
13
|
-
* - token type (regex, string, comment, other)
|
|
14
|
-
* - font style
|
|
15
|
-
* - foreground color
|
|
16
|
-
* - background color
|
|
17
|
-
* e.g. for getting the languageId: `(metadata & MetadataConsts.LANGUAGEID_MASK) >>> MetadataConsts.LANGUAGEID_OFFSET`
|
|
18
|
-
*/
|
|
19
|
-
tokenizeLine2(lineText: string, prevState: StateStack | null, timeLimit?: number): ITokenizeLineResult2;
|
|
20
|
-
}
|
|
21
|
-
interface ITokenizeLineResult {
|
|
22
|
-
readonly tokens: IToken[];
|
|
23
|
-
/**
|
|
24
|
-
* The `prevState` to be passed on to the next line tokenization.
|
|
25
|
-
*/
|
|
26
|
-
readonly ruleStack: StateStack;
|
|
27
|
-
/**
|
|
28
|
-
* Did tokenization stop early due to reaching the time limit.
|
|
29
|
-
*/
|
|
30
|
-
readonly stoppedEarly: boolean;
|
|
31
|
-
}
|
|
32
|
-
interface ITokenizeLineResult2 {
|
|
33
|
-
/**
|
|
34
|
-
* The tokens in binary format. Each token occupies two array indices. For token i:
|
|
35
|
-
* - at offset 2*i => startIndex
|
|
36
|
-
* - at offset 2*i + 1 => metadata
|
|
37
|
-
*
|
|
38
|
-
*/
|
|
39
|
-
readonly tokens: Uint32Array;
|
|
40
|
-
/**
|
|
41
|
-
* The `prevState` to be passed on to the next line tokenization.
|
|
42
|
-
*/
|
|
43
|
-
readonly ruleStack: StateStack;
|
|
44
|
-
/**
|
|
45
|
-
* Did tokenization stop early due to reaching the time limit.
|
|
46
|
-
*/
|
|
47
|
-
readonly stoppedEarly: boolean;
|
|
48
|
-
}
|
|
49
|
-
interface IToken {
|
|
50
|
-
startIndex: number;
|
|
51
|
-
readonly endIndex: number;
|
|
52
|
-
readonly scopes: string[];
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* **IMPORTANT** - Immutable!
|
|
56
|
-
*/
|
|
57
|
-
interface StateStack {
|
|
58
|
-
_stackElementBrand: void;
|
|
59
|
-
readonly depth: number;
|
|
60
|
-
clone(): StateStack;
|
|
61
|
-
equals(other: StateStack): boolean;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export type { IGrammar, IToken, ITokenizeLineResult, ITokenizeLineResult2, StateStack };
|