dot-language-support 3.0.1 → 4.0.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/README.md +1 -1
- package/dist/index.d.ts +341 -272
- package/dist/index.js +805 -683
- package/package.json +6 -7
package/dist/index.d.ts
CHANGED
|
@@ -2,37 +2,41 @@ import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
|
2
2
|
import * as lst from 'vscode-languageserver-types';
|
|
3
3
|
import { ColorInformation, Color as Color$1, ColorPresentation } from 'vscode-languageserver-types';
|
|
4
4
|
|
|
5
|
-
declare const
|
|
6
|
-
Scan
|
|
7
|
-
Parse
|
|
8
|
-
Check
|
|
9
|
-
}
|
|
5
|
+
declare const errorSource: {
|
|
6
|
+
readonly Scan: 1;
|
|
7
|
+
readonly Parse: 2;
|
|
8
|
+
readonly Check: 4;
|
|
9
|
+
};
|
|
10
|
+
type ErrorSource = (typeof errorSource)[keyof typeof errorSource];
|
|
10
11
|
type ErrorCode = ParseErrorCode | ScanErrorCode | CheckErrorCode;
|
|
11
12
|
interface ParseErrorCode {
|
|
12
|
-
source:
|
|
13
|
+
source: typeof errorSource.Parse;
|
|
13
14
|
sub: ParseError;
|
|
14
15
|
}
|
|
15
16
|
interface ScanErrorCode {
|
|
16
|
-
source:
|
|
17
|
+
source: typeof errorSource.Scan;
|
|
17
18
|
sub: ScanError;
|
|
18
19
|
}
|
|
19
20
|
interface CheckErrorCode {
|
|
20
|
-
source:
|
|
21
|
+
source: typeof errorSource.Check;
|
|
21
22
|
sub: CheckError;
|
|
22
23
|
}
|
|
23
|
-
declare const
|
|
24
|
-
ExpectationFailed
|
|
25
|
-
TrailingData
|
|
26
|
-
FailedListParsing
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
declare const parseError: {
|
|
25
|
+
readonly ExpectationFailed: 0;
|
|
26
|
+
readonly TrailingData: 1;
|
|
27
|
+
readonly FailedListParsing: 2;
|
|
28
|
+
};
|
|
29
|
+
type ParseError = (typeof parseError)[keyof typeof parseError];
|
|
30
|
+
declare const scanError: {
|
|
31
|
+
readonly ExpectationFailed: 0;
|
|
32
|
+
readonly Unterminated: 1;
|
|
33
|
+
};
|
|
34
|
+
type ScanError = (typeof scanError)[keyof typeof scanError];
|
|
35
|
+
declare const checkError: {
|
|
36
|
+
readonly InvalidEdgeOperation: 0;
|
|
37
|
+
readonly InvalidShapeName: 1;
|
|
38
|
+
};
|
|
39
|
+
type CheckError = (typeof checkError)[keyof typeof checkError];
|
|
36
40
|
interface DiagnosticMessage {
|
|
37
41
|
message: string;
|
|
38
42
|
code: ErrorCode;
|
|
@@ -40,12 +44,13 @@ interface DiagnosticMessage {
|
|
|
40
44
|
start: number;
|
|
41
45
|
end: number;
|
|
42
46
|
}
|
|
43
|
-
declare
|
|
44
|
-
Error
|
|
45
|
-
Warning
|
|
46
|
-
Message
|
|
47
|
-
Suggestion
|
|
48
|
-
}
|
|
47
|
+
declare const diagnosticCategory: {
|
|
48
|
+
readonly Error: 1;
|
|
49
|
+
readonly Warning: 2;
|
|
50
|
+
readonly Message: 3;
|
|
51
|
+
readonly Suggestion: 4;
|
|
52
|
+
};
|
|
53
|
+
type DiagnosticCategory = (typeof diagnosticCategory)[keyof typeof diagnosticCategory];
|
|
49
54
|
type ID = string;
|
|
50
55
|
interface SourceFile {
|
|
51
56
|
content: string;
|
|
@@ -56,174 +61,233 @@ interface SourceFile {
|
|
|
56
61
|
colors?: ColorTable;
|
|
57
62
|
}
|
|
58
63
|
interface HtmlIdentifier extends SyntaxNode {
|
|
59
|
-
kind:
|
|
64
|
+
kind: typeof syntaxKind.HtmlIdentifier;
|
|
60
65
|
htmlContent: string;
|
|
61
66
|
}
|
|
62
67
|
interface TextIdentifier extends SyntaxNode {
|
|
63
|
-
kind:
|
|
68
|
+
kind: typeof syntaxKind.TextIdentifier;
|
|
64
69
|
text: string;
|
|
65
70
|
}
|
|
66
71
|
interface QuotedTextIdentifier extends SyntaxNode {
|
|
67
|
-
kind:
|
|
72
|
+
kind: typeof syntaxKind.QuotedTextIdentifier;
|
|
68
73
|
values: SyntaxNodeArray<StringLiteral>;
|
|
69
74
|
concatenation?: string;
|
|
70
75
|
}
|
|
71
76
|
interface StringLiteral extends SyntaxNode {
|
|
72
|
-
kind:
|
|
77
|
+
kind: typeof syntaxKind.StringLiteral;
|
|
73
78
|
text: string;
|
|
74
79
|
}
|
|
75
80
|
interface NumericIdentifier extends SyntaxNode {
|
|
76
|
-
kind:
|
|
81
|
+
kind: typeof syntaxKind.NumericIdentifier;
|
|
77
82
|
text: string;
|
|
78
83
|
value: number;
|
|
79
84
|
}
|
|
80
85
|
type Identifier = TextIdentifier | QuotedTextIdentifier | HtmlIdentifier | NumericIdentifier;
|
|
81
86
|
interface Graph extends SyntaxNode {
|
|
82
|
-
kind:
|
|
83
|
-
keyword: Token<
|
|
84
|
-
strict?: Token<
|
|
87
|
+
kind: typeof syntaxKind.DirectedGraph | typeof syntaxKind.UndirectedGraph;
|
|
88
|
+
keyword: Token<typeof syntaxKind.GraphKeyword | typeof syntaxKind.DigraphKeyword>;
|
|
89
|
+
strict?: Token<typeof syntaxKind.StrictKeyword>;
|
|
85
90
|
id?: Identifier;
|
|
86
91
|
statements: SyntaxNodeArray<Statement>;
|
|
87
92
|
}
|
|
88
93
|
interface StatementBase {
|
|
89
94
|
terminator?: StatementSeparator;
|
|
90
95
|
}
|
|
91
|
-
type StatementSeparator = Token<
|
|
96
|
+
type StatementSeparator = Token<typeof syntaxKind.SemicolonToken>;
|
|
92
97
|
type Statement = NodeStatement | EdgeStatement | AttributeStatement | IdEqualsIdStatement | SubGraphStatement;
|
|
93
98
|
interface NodeStatement extends SyntaxNode, StatementBase {
|
|
94
|
-
kind:
|
|
99
|
+
kind: typeof syntaxKind.NodeStatement;
|
|
95
100
|
id: NodeId;
|
|
96
101
|
attributes: SyntaxNodeArray<AttributeContainer>;
|
|
97
102
|
}
|
|
98
103
|
interface NodeId extends SyntaxNode {
|
|
99
|
-
kind:
|
|
104
|
+
kind: typeof syntaxKind.NodeId;
|
|
100
105
|
id: Identifier;
|
|
101
106
|
port?: PortDeclaration;
|
|
102
107
|
}
|
|
103
108
|
type EdgeSourceOrTarget = NodeId | SubGraph;
|
|
104
109
|
interface EdgeStatement extends SyntaxNode, StatementBase {
|
|
105
|
-
kind:
|
|
110
|
+
kind: typeof syntaxKind.EdgeStatement;
|
|
106
111
|
source: EdgeSourceOrTarget;
|
|
107
112
|
rhs: SyntaxNodeArray<EdgeRhs>;
|
|
108
113
|
attributes: SyntaxNodeArray<AttributeContainer>;
|
|
109
114
|
}
|
|
110
115
|
interface AttributeStatement extends SyntaxNode, StatementBase {
|
|
111
|
-
kind:
|
|
112
|
-
subject: Token<
|
|
116
|
+
kind: typeof syntaxKind.AttributeStatement;
|
|
117
|
+
subject: Token<typeof syntaxKind.GraphKeyword> | Token<typeof syntaxKind.NodeKeyword> | Token<typeof syntaxKind.EdgeKeyword>;
|
|
113
118
|
attributes: SyntaxNodeArray<AttributeContainer>;
|
|
114
119
|
}
|
|
115
120
|
interface IdEqualsIdStatement extends SyntaxNode, StatementBase {
|
|
116
|
-
kind:
|
|
121
|
+
kind: typeof syntaxKind.IdEqualsIdStatement;
|
|
117
122
|
leftId: Identifier;
|
|
118
123
|
rightId: Identifier;
|
|
119
124
|
}
|
|
120
125
|
interface SubGraph extends SyntaxNode {
|
|
121
|
-
kind:
|
|
126
|
+
kind: typeof syntaxKind.SubGraph;
|
|
122
127
|
id?: Identifier;
|
|
123
128
|
statements: SyntaxNodeArray<Statement>;
|
|
124
129
|
}
|
|
125
130
|
interface SubGraphStatement extends SyntaxNode, StatementBase {
|
|
126
|
-
kind:
|
|
131
|
+
kind: typeof syntaxKind.SubGraphStatement;
|
|
127
132
|
subgraph: SubGraph;
|
|
128
133
|
}
|
|
129
134
|
interface EdgeRhs extends SyntaxNode {
|
|
130
|
-
kind:
|
|
135
|
+
kind: typeof syntaxKind.EdgeRhs;
|
|
131
136
|
operation: EdgeOp;
|
|
132
137
|
target: EdgeSourceOrTarget;
|
|
133
138
|
}
|
|
134
139
|
interface AttributeContainer extends SyntaxNode {
|
|
135
|
-
kind:
|
|
136
|
-
openBracket: Token<
|
|
140
|
+
kind: typeof syntaxKind.AttributeContainer;
|
|
141
|
+
openBracket: Token<typeof syntaxKind.OpenBracketToken>;
|
|
137
142
|
assignments: SyntaxNodeArray<Assignment>;
|
|
138
|
-
closeBracket: Token<
|
|
143
|
+
closeBracket: Token<typeof syntaxKind.CloseBracketToken>;
|
|
139
144
|
}
|
|
140
145
|
interface Assignment extends SyntaxNode {
|
|
141
|
-
kind:
|
|
146
|
+
kind: typeof syntaxKind.Assignment;
|
|
142
147
|
leftId: Identifier;
|
|
143
148
|
rightId: Identifier;
|
|
144
149
|
terminator?: AssignmentSeparator;
|
|
145
150
|
}
|
|
146
|
-
type AssignmentSeparator = Token<
|
|
151
|
+
type AssignmentSeparator = Token<typeof syntaxKind.SemicolonToken> | Token<typeof syntaxKind.CommaToken>;
|
|
147
152
|
type PortDeclaration = NormalPortDeclaration | CompassPortDeclaration;
|
|
148
153
|
interface NormalPortDeclaration extends SyntaxNode {
|
|
149
|
-
kind:
|
|
150
|
-
colon: Token<
|
|
154
|
+
kind: typeof syntaxKind.NormalPortDeclaration;
|
|
155
|
+
colon: Token<typeof syntaxKind.ColonToken>;
|
|
151
156
|
id: Identifier;
|
|
152
157
|
compassPt?: CompassPortDeclaration;
|
|
153
158
|
}
|
|
154
159
|
interface CompassPortDeclaration extends SyntaxNode {
|
|
155
|
-
kind:
|
|
156
|
-
colon: Token<
|
|
160
|
+
kind: typeof syntaxKind.CompassPortDeclaration;
|
|
161
|
+
colon: Token<typeof syntaxKind.ColonToken>;
|
|
157
162
|
compassPt: CompassPort;
|
|
158
163
|
}
|
|
159
|
-
type CompassPort = Token<
|
|
160
|
-
type EdgeOp = Token<
|
|
164
|
+
type CompassPort = Token<typeof syntaxKind.CompassNorthToken> | Token<typeof syntaxKind.CompassNorthEastToken> | Token<typeof syntaxKind.CompassEastToken> | Token<typeof syntaxKind.CompassSouthEastToken> | Token<typeof syntaxKind.CompassSouthToken> | Token<typeof syntaxKind.CompassSouthWestToken> | Token<typeof syntaxKind.CompassWestToken> | Token<typeof syntaxKind.CompassNorthWestToken> | Token<typeof syntaxKind.CompassCenterToken> | Token<typeof syntaxKind.UnderscoreToken>;
|
|
165
|
+
type EdgeOp = Token<typeof syntaxKind.DirectedEdgeOp> | Token<typeof syntaxKind.UndirectedEdgeOp>;
|
|
161
166
|
interface TextRange {
|
|
162
167
|
pos: number;
|
|
163
168
|
end: number;
|
|
164
169
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
170
|
+
type SyntaxKind = (typeof syntaxKind)[keyof typeof syntaxKind];
|
|
171
|
+
declare const syntaxKind: {
|
|
172
|
+
readonly Unknown: 0;
|
|
173
|
+
readonly EndOfFileToken: 1;
|
|
174
|
+
readonly NewLineTrivia: 2;
|
|
175
|
+
readonly WhitespaceTrivia: 3;
|
|
176
|
+
readonly HashCommentTrivia: 4;
|
|
177
|
+
readonly SingleLineCommentTrivia: 5;
|
|
178
|
+
readonly MultiLineCommentTrivia: 6;
|
|
179
|
+
readonly CommaToken: 7;
|
|
180
|
+
readonly SemicolonToken: 8;
|
|
181
|
+
readonly PlusToken: 9;
|
|
182
|
+
readonly OpenBraceToken: 10;
|
|
183
|
+
readonly CloseBraceToken: 11;
|
|
184
|
+
readonly OpenBracketToken: 12;
|
|
185
|
+
readonly CloseBracketToken: 13;
|
|
186
|
+
readonly ColonToken: 14;
|
|
187
|
+
readonly EqualsToken: 15;
|
|
188
|
+
readonly LessThan: 16;
|
|
189
|
+
readonly GreaterThan: 17;
|
|
190
|
+
readonly CompassNorthToken: 18;
|
|
191
|
+
readonly CompassNorthEastToken: 19;
|
|
192
|
+
readonly CompassEastToken: 20;
|
|
193
|
+
readonly CompassSouthEastToken: 21;
|
|
194
|
+
readonly CompassSouthToken: 22;
|
|
195
|
+
readonly CompassSouthWestToken: 23;
|
|
196
|
+
readonly CompassWestToken: 24;
|
|
197
|
+
readonly CompassNorthWestToken: 25;
|
|
198
|
+
readonly CompassCenterToken: 26;
|
|
199
|
+
readonly UnderscoreToken: 27;
|
|
200
|
+
readonly StringLiteral: 28;
|
|
201
|
+
readonly HtmlIdentifier: 29;
|
|
202
|
+
readonly TextIdentifier: 30;
|
|
203
|
+
readonly QuotedTextIdentifier: 31;
|
|
204
|
+
readonly NumericIdentifier: 32;
|
|
205
|
+
readonly GraphKeyword: 33;
|
|
206
|
+
readonly DigraphKeyword: 34;
|
|
207
|
+
readonly NodeKeyword: 35;
|
|
208
|
+
readonly EdgeKeyword: 36;
|
|
209
|
+
readonly SubgraphKeyword: 37;
|
|
210
|
+
readonly StrictKeyword: 38;
|
|
211
|
+
readonly DirectedEdgeOp: 39;
|
|
212
|
+
readonly UndirectedEdgeOp: 40;
|
|
213
|
+
readonly DirectedGraph: 41;
|
|
214
|
+
readonly UndirectedGraph: 42;
|
|
215
|
+
readonly NodeStatement: 43;
|
|
216
|
+
readonly EdgeStatement: 44;
|
|
217
|
+
readonly AttributeStatement: 45;
|
|
218
|
+
readonly IdEqualsIdStatement: 46;
|
|
219
|
+
readonly SubGraph: 47;
|
|
220
|
+
readonly SubGraphStatement: 48;
|
|
221
|
+
readonly EdgeRhs: 49;
|
|
222
|
+
readonly AttributeContainer: 50;
|
|
223
|
+
readonly Assignment: 51;
|
|
224
|
+
readonly NormalPortDeclaration: 52;
|
|
225
|
+
readonly CompassPortDeclaration: 53;
|
|
226
|
+
readonly NodeId: 54;
|
|
227
|
+
readonly Count: 55;
|
|
228
|
+
readonly FirstNode: 41;
|
|
229
|
+
readonly CompassBegin: 18;
|
|
230
|
+
readonly CompassEnd: 27;
|
|
231
|
+
readonly LastKeyword: 38;
|
|
232
|
+
};
|
|
233
|
+
declare const syntaxKindNames: {
|
|
234
|
+
readonly 0: "Unknown";
|
|
235
|
+
readonly 1: "EndOfFileToken";
|
|
236
|
+
readonly 2: "NewLineTrivia";
|
|
237
|
+
readonly 3: "WhitespaceTrivia";
|
|
238
|
+
readonly 4: "HashCommentTrivia";
|
|
239
|
+
readonly 5: "SingleLineCommentTrivia";
|
|
240
|
+
readonly 6: "MultiLineCommentTrivia";
|
|
241
|
+
readonly 7: "CommaToken";
|
|
242
|
+
readonly 8: "SemicolonToken";
|
|
243
|
+
readonly 9: "PlusToken";
|
|
244
|
+
readonly 10: "OpenBraceToken";
|
|
245
|
+
readonly 11: "CloseBraceToken";
|
|
246
|
+
readonly 12: "OpenBracketToken";
|
|
247
|
+
readonly 13: "CloseBracketToken";
|
|
248
|
+
readonly 14: "ColonToken";
|
|
249
|
+
readonly 15: "EqualsToken";
|
|
250
|
+
readonly 16: "LessThan";
|
|
251
|
+
readonly 17: "GreaterThan";
|
|
252
|
+
readonly 18: "CompassNorthToken";
|
|
253
|
+
readonly 19: "CompassNorthEastToken";
|
|
254
|
+
readonly 20: "CompassEastToken";
|
|
255
|
+
readonly 21: "CompassSouthEastToken";
|
|
256
|
+
readonly 22: "CompassSouthToken";
|
|
257
|
+
readonly 23: "CompassSouthWestToken";
|
|
258
|
+
readonly 24: "CompassWestToken";
|
|
259
|
+
readonly 25: "CompassNorthWestToken";
|
|
260
|
+
readonly 26: "CompassCenterToken";
|
|
261
|
+
readonly 27: "UnderscoreToken";
|
|
262
|
+
readonly 28: "StringLiteral";
|
|
263
|
+
readonly 29: "HtmlIdentifier";
|
|
264
|
+
readonly 30: "TextIdentifier";
|
|
265
|
+
readonly 31: "QuotedTextIdentifier";
|
|
266
|
+
readonly 32: "NumericIdentifier";
|
|
267
|
+
readonly 33: "GraphKeyword";
|
|
268
|
+
readonly 34: "DigraphKeyword";
|
|
269
|
+
readonly 35: "NodeKeyword";
|
|
270
|
+
readonly 36: "EdgeKeyword";
|
|
271
|
+
readonly 37: "SubgraphKeyword";
|
|
272
|
+
readonly 38: "StrictKeyword";
|
|
273
|
+
readonly 39: "DirectedEdgeOp";
|
|
274
|
+
readonly 40: "UndirectedEdgeOp";
|
|
275
|
+
readonly 41: "DirectedGraph";
|
|
276
|
+
readonly 42: "UndirectedGraph";
|
|
277
|
+
readonly 43: "NodeStatement";
|
|
278
|
+
readonly 44: "EdgeStatement";
|
|
279
|
+
readonly 45: "AttributeStatement";
|
|
280
|
+
readonly 46: "IdEqualsIdStatement";
|
|
281
|
+
readonly 47: "SubGraph";
|
|
282
|
+
readonly 48: "SubGraphStatement";
|
|
283
|
+
readonly 49: "EdgeRhs";
|
|
284
|
+
readonly 50: "AttributeContainer";
|
|
285
|
+
readonly 51: "Assignment";
|
|
286
|
+
readonly 52: "NormalPortDeclaration";
|
|
287
|
+
readonly 53: "CompassPortDeclaration";
|
|
288
|
+
readonly 54: "NodeId";
|
|
289
|
+
readonly 55: "Count";
|
|
290
|
+
};
|
|
227
291
|
interface SyntaxNode extends TextRange {
|
|
228
292
|
kind: SyntaxKind;
|
|
229
293
|
flags: SyntaxNodeFlags;
|
|
@@ -238,148 +302,152 @@ interface SyntaxNodeArray<T extends SyntaxNode> extends ReadonlyArray<T>, TextRa
|
|
|
238
302
|
hasTrailingComma?: boolean;
|
|
239
303
|
}
|
|
240
304
|
type MutableSyntaxNodeArray<T extends SyntaxNode> = SyntaxNodeArray<T> & T[];
|
|
241
|
-
declare const
|
|
242
|
-
None
|
|
243
|
-
ContainsErrors
|
|
244
|
-
Synthesized
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
305
|
+
declare const syntaxNodeFlags: {
|
|
306
|
+
readonly None: 0;
|
|
307
|
+
readonly ContainsErrors: number;
|
|
308
|
+
readonly Synthesized: number;
|
|
309
|
+
};
|
|
310
|
+
type SyntaxNodeFlags = (typeof syntaxNodeFlags)[keyof typeof syntaxNodeFlags];
|
|
311
|
+
declare const graphContext: {
|
|
312
|
+
readonly None: 0;
|
|
313
|
+
readonly Strict: number;
|
|
314
|
+
readonly Directed: number;
|
|
315
|
+
readonly Undirected: number;
|
|
316
|
+
};
|
|
317
|
+
type GraphContext = (typeof graphContext)[keyof typeof graphContext];
|
|
318
|
+
declare const tokenFlags: {
|
|
319
|
+
readonly None: 0;
|
|
320
|
+
readonly Unterminated: number;
|
|
321
|
+
readonly PrecedingLineBreak: number;
|
|
322
|
+
};
|
|
323
|
+
type TokenFlags = (typeof tokenFlags)[keyof typeof tokenFlags];
|
|
324
|
+
type CharacterCodes = (typeof characterCodes)[keyof typeof characterCodes];
|
|
325
|
+
declare const characterCodes: {
|
|
326
|
+
readonly nullCharacter: 0;
|
|
327
|
+
readonly maxAsciiCharacter: 127;
|
|
328
|
+
readonly lineFeed: 10;
|
|
329
|
+
readonly carriageReturn: 13;
|
|
330
|
+
readonly lineSeparator: 8232;
|
|
331
|
+
readonly paragraphSeparator: 8233;
|
|
332
|
+
readonly nextLine: 133;
|
|
333
|
+
readonly space: 32;
|
|
334
|
+
readonly nonBreakingSpace: 160;
|
|
335
|
+
readonly enQuad: 8192;
|
|
336
|
+
readonly emQuad: 8193;
|
|
337
|
+
readonly enSpace: 8194;
|
|
338
|
+
readonly emSpace: 8195;
|
|
339
|
+
readonly threePerEmSpace: 8196;
|
|
340
|
+
readonly fourPerEmSpace: 8197;
|
|
341
|
+
readonly sixPerEmSpace: 8198;
|
|
342
|
+
readonly figureSpace: 8199;
|
|
343
|
+
readonly punctuationSpace: 8200;
|
|
344
|
+
readonly thinSpace: 8201;
|
|
345
|
+
readonly hairSpace: 8202;
|
|
346
|
+
readonly zeroWidthSpace: 8203;
|
|
347
|
+
readonly narrowNoBreakSpace: 8239;
|
|
348
|
+
readonly ideographicSpace: 12288;
|
|
349
|
+
readonly mathematicalSpace: 8287;
|
|
350
|
+
readonly ogham: 5760;
|
|
351
|
+
readonly _: 95;
|
|
352
|
+
readonly $: 36;
|
|
353
|
+
readonly _0: 48;
|
|
354
|
+
readonly _1: 49;
|
|
355
|
+
readonly _2: 50;
|
|
356
|
+
readonly _3: 51;
|
|
357
|
+
readonly _4: 52;
|
|
358
|
+
readonly _5: 53;
|
|
359
|
+
readonly _6: 54;
|
|
360
|
+
readonly _7: 55;
|
|
361
|
+
readonly _8: 56;
|
|
362
|
+
readonly _9: 57;
|
|
363
|
+
readonly a: 97;
|
|
364
|
+
readonly b: 98;
|
|
365
|
+
readonly c: 99;
|
|
366
|
+
readonly d: 100;
|
|
367
|
+
readonly e: 101;
|
|
368
|
+
readonly f: 102;
|
|
369
|
+
readonly g: 103;
|
|
370
|
+
readonly h: 104;
|
|
371
|
+
readonly i: 105;
|
|
372
|
+
readonly j: 106;
|
|
373
|
+
readonly k: 107;
|
|
374
|
+
readonly l: 108;
|
|
375
|
+
readonly m: 109;
|
|
376
|
+
readonly n: 110;
|
|
377
|
+
readonly o: 111;
|
|
378
|
+
readonly p: 112;
|
|
379
|
+
readonly q: 113;
|
|
380
|
+
readonly r: 114;
|
|
381
|
+
readonly s: 115;
|
|
382
|
+
readonly t: 116;
|
|
383
|
+
readonly u: 117;
|
|
384
|
+
readonly v: 118;
|
|
385
|
+
readonly w: 119;
|
|
386
|
+
readonly x: 120;
|
|
387
|
+
readonly y: 121;
|
|
388
|
+
readonly z: 122;
|
|
389
|
+
readonly A: 65;
|
|
390
|
+
readonly B: 66;
|
|
391
|
+
readonly C: 67;
|
|
392
|
+
readonly D: 68;
|
|
393
|
+
readonly E: 69;
|
|
394
|
+
readonly F: 70;
|
|
395
|
+
readonly G: 71;
|
|
396
|
+
readonly H: 72;
|
|
397
|
+
readonly I: 73;
|
|
398
|
+
readonly J: 74;
|
|
399
|
+
readonly K: 75;
|
|
400
|
+
readonly L: 76;
|
|
401
|
+
readonly M: 77;
|
|
402
|
+
readonly N: 78;
|
|
403
|
+
readonly O: 79;
|
|
404
|
+
readonly P: 80;
|
|
405
|
+
readonly Q: 81;
|
|
406
|
+
readonly R: 82;
|
|
407
|
+
readonly S: 83;
|
|
408
|
+
readonly T: 84;
|
|
409
|
+
readonly U: 85;
|
|
410
|
+
readonly V: 86;
|
|
411
|
+
readonly W: 87;
|
|
412
|
+
readonly X: 88;
|
|
413
|
+
readonly Y: 89;
|
|
414
|
+
readonly Z: 90;
|
|
415
|
+
readonly ampersand: 38;
|
|
416
|
+
readonly asterisk: 42;
|
|
417
|
+
readonly at: 64;
|
|
418
|
+
readonly backslash: 92;
|
|
419
|
+
readonly backtick: 96;
|
|
420
|
+
readonly bar: 124;
|
|
421
|
+
readonly caret: 94;
|
|
422
|
+
readonly closeBrace: 125;
|
|
423
|
+
readonly closeBracket: 93;
|
|
424
|
+
readonly closeParen: 41;
|
|
425
|
+
readonly colon: 58;
|
|
426
|
+
readonly comma: 44;
|
|
427
|
+
readonly dot: 46;
|
|
428
|
+
readonly doubleQuote: 34;
|
|
429
|
+
readonly equals: 61;
|
|
430
|
+
readonly exclamation: 33;
|
|
431
|
+
readonly greaterThan: 62;
|
|
432
|
+
readonly hash: 35;
|
|
433
|
+
readonly lessThan: 60;
|
|
434
|
+
readonly minus: 45;
|
|
435
|
+
readonly openBrace: 123;
|
|
436
|
+
readonly openBracket: 91;
|
|
437
|
+
readonly openParen: 40;
|
|
438
|
+
readonly percent: 37;
|
|
439
|
+
readonly plus: 43;
|
|
440
|
+
readonly question: 63;
|
|
441
|
+
readonly semicolon: 59;
|
|
442
|
+
readonly singleQuote: 39;
|
|
443
|
+
readonly slash: 47;
|
|
444
|
+
readonly tilde: 126;
|
|
445
|
+
readonly backspace: 8;
|
|
446
|
+
readonly formFeed: 12;
|
|
447
|
+
readonly byteOrderMark: 65279;
|
|
448
|
+
readonly tab: 9;
|
|
449
|
+
readonly verticalTab: 11;
|
|
450
|
+
};
|
|
383
451
|
type SymbolTable = Map<string, TypeSymbol>;
|
|
384
452
|
type ColorTable = Map<string, ColorInfo>;
|
|
385
453
|
interface TypeSymbol {
|
|
@@ -398,7 +466,7 @@ interface Color {
|
|
|
398
466
|
readonly alpha: number;
|
|
399
467
|
}
|
|
400
468
|
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
401
|
-
type StatementOf<T extends Statement["kind"]> = T extends
|
|
469
|
+
type StatementOf<T extends Statement["kind"]> = T extends typeof syntaxKind.SubGraphStatement ? SubGraphStatement : T extends typeof syntaxKind.AttributeStatement ? AttributeStatement : T extends typeof syntaxKind.EdgeStatement ? EdgeStatement : T extends typeof syntaxKind.IdEqualsIdStatement ? IdEqualsIdStatement : T extends typeof syntaxKind.NodeStatement ? NodeStatement : never;
|
|
402
470
|
|
|
403
471
|
interface Scanner {
|
|
404
472
|
readonly end: number;
|
|
@@ -441,15 +509,16 @@ declare function isIdentifierStart(ch: number): boolean;
|
|
|
441
509
|
declare function skipTrivia(text: string, pos: number): number;
|
|
442
510
|
declare function isLineBreak(ch: number): boolean;
|
|
443
511
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
512
|
+
type ParsingContext = (typeof parsingContext)[keyof typeof parsingContext];
|
|
513
|
+
declare const parsingContext: {
|
|
514
|
+
readonly None: 0;
|
|
515
|
+
readonly StatementList: 1;
|
|
516
|
+
readonly AttributeContainerList: 2;
|
|
517
|
+
readonly AssignmentList: 3;
|
|
518
|
+
readonly EdgeRhsList: 4;
|
|
519
|
+
readonly QuotedTextIdentifierConcatenation: 5;
|
|
520
|
+
readonly Count: 6;
|
|
521
|
+
};
|
|
453
522
|
declare class Parser {
|
|
454
523
|
#private;
|
|
455
524
|
currentToken: SyntaxKind;
|
|
@@ -464,7 +533,7 @@ declare class Parser {
|
|
|
464
533
|
constructor();
|
|
465
534
|
parse(sourceText: string): SourceFile;
|
|
466
535
|
}
|
|
467
|
-
declare function isIdentifier(kind: SyntaxKind): kind is
|
|
536
|
+
declare function isIdentifier(kind: SyntaxKind): kind is 29 | 30 | 31 | 32;
|
|
468
537
|
declare function isIdentifierNode(node: SyntaxNode): node is Identifier;
|
|
469
538
|
|
|
470
539
|
interface DocumentLike {
|
|
@@ -494,4 +563,4 @@ declare function createService(): LanguageService;
|
|
|
494
563
|
|
|
495
564
|
declare function forEachChild<TReturn>(node: SyntaxNode, cbNode: (node: SyntaxNode) => TReturn, cbNodes?: (nodes: SyntaxNodeArray<SyntaxNode>) => TReturn): TReturn | undefined;
|
|
496
565
|
|
|
497
|
-
export { type Assignment, type AssignmentSeparator, type AttributeContainer, type AttributeStatement, CharacterCodes, CheckError, type CheckErrorCode, type Color, type ColorInfo, type ColorTable, type CommandApplication, type CompassPort, type CompassPortDeclaration, DefaultScanner, DiagnosticCategory, type DiagnosticMessage, type DocumentLike, type EdgeOp, type EdgeRhs, type EdgeSourceOrTarget, type EdgeStatement, type ErrorCallback, type ErrorCode, ErrorSource, type Graph, GraphContext, type HtmlIdentifier, type ID, type IdEqualsIdStatement, type Identifier, type LanguageService, type MutableSyntaxNodeArray, type NodeId, type NodeStatement, type NormalPortDeclaration, type NumericIdentifier, type Omit, ParseError, type ParseErrorCode, Parser, ParsingContext, type PortDeclaration, type QuotedTextIdentifier, ScanError, type ScanErrorCode, type Scanner, type SourceFile, type Statement, type StatementBase, type StatementOf, type StatementSeparator, type StringLiteral, type SubGraph, type SubGraphStatement, type SymbolTable, SyntaxKind, type SyntaxNode, type SyntaxNodeArray, SyntaxNodeFlags, type TextIdentifier, type TextRange, type Token, TokenFlags, type TypeSymbol, createService, forEachChild, getTextAsToken, getTokenAsText, isIdentifier, isIdentifierNode, isIdentifierStart, isLineBreak, skipTrivia };
|
|
566
|
+
export { type Assignment, type AssignmentSeparator, type AttributeContainer, type AttributeStatement, type CharacterCodes, type CheckError, type CheckErrorCode, type Color, type ColorInfo, type ColorTable, type CommandApplication, type CompassPort, type CompassPortDeclaration, DefaultScanner, type DiagnosticCategory, type DiagnosticMessage, type DocumentLike, type EdgeOp, type EdgeRhs, type EdgeSourceOrTarget, type EdgeStatement, type ErrorCallback, type ErrorCode, type ErrorSource, type Graph, type GraphContext, type HtmlIdentifier, type ID, type IdEqualsIdStatement, type Identifier, type LanguageService, type MutableSyntaxNodeArray, type NodeId, type NodeStatement, type NormalPortDeclaration, type NumericIdentifier, type Omit, type ParseError, type ParseErrorCode, Parser, type ParsingContext, type PortDeclaration, type QuotedTextIdentifier, type ScanError, type ScanErrorCode, type Scanner, type SourceFile, type Statement, type StatementBase, type StatementOf, type StatementSeparator, type StringLiteral, type SubGraph, type SubGraphStatement, type SymbolTable, type SyntaxKind, type SyntaxNode, type SyntaxNodeArray, type SyntaxNodeFlags, type TextIdentifier, type TextRange, type Token, type TokenFlags, type TypeSymbol, characterCodes, checkError, createService, diagnosticCategory, errorSource, forEachChild, getTextAsToken, getTokenAsText, graphContext, isIdentifier, isIdentifierNode, isIdentifierStart, isLineBreak, parseError, parsingContext, scanError, skipTrivia, syntaxKind, syntaxKindNames, syntaxNodeFlags, tokenFlags };
|