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/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 enum ErrorSource {
6
- Scan = 1,
7
- Parse = 2,
8
- Check = 4
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: ErrorSource.Parse;
13
+ source: typeof errorSource.Parse;
13
14
  sub: ParseError;
14
15
  }
15
16
  interface ScanErrorCode {
16
- source: ErrorSource.Scan;
17
+ source: typeof errorSource.Scan;
17
18
  sub: ScanError;
18
19
  }
19
20
  interface CheckErrorCode {
20
- source: ErrorSource.Check;
21
+ source: typeof errorSource.Check;
21
22
  sub: CheckError;
22
23
  }
23
- declare const enum ParseError {
24
- ExpectationFailed = 0,
25
- TrailingData = 1,
26
- FailedListParsing = 2
27
- }
28
- declare const enum ScanError {
29
- ExpectationFailed = 0,
30
- Unterminated = 1
31
- }
32
- declare const enum CheckError {
33
- InvalidEdgeOperation = 0,
34
- InvalidShapeName = 1
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 enum DiagnosticCategory {
44
- Error = 1,
45
- Warning = 2,
46
- Message = 3,
47
- Suggestion = 4
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: SyntaxKind.HtmlIdentifier;
64
+ kind: typeof syntaxKind.HtmlIdentifier;
60
65
  htmlContent: string;
61
66
  }
62
67
  interface TextIdentifier extends SyntaxNode {
63
- kind: SyntaxKind.TextIdentifier;
68
+ kind: typeof syntaxKind.TextIdentifier;
64
69
  text: string;
65
70
  }
66
71
  interface QuotedTextIdentifier extends SyntaxNode {
67
- kind: SyntaxKind.QuotedTextIdentifier;
72
+ kind: typeof syntaxKind.QuotedTextIdentifier;
68
73
  values: SyntaxNodeArray<StringLiteral>;
69
74
  concatenation?: string;
70
75
  }
71
76
  interface StringLiteral extends SyntaxNode {
72
- kind: SyntaxKind.StringLiteral;
77
+ kind: typeof syntaxKind.StringLiteral;
73
78
  text: string;
74
79
  }
75
80
  interface NumericIdentifier extends SyntaxNode {
76
- kind: SyntaxKind.NumericIdentifier;
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: SyntaxKind.DirectedGraph | SyntaxKind.UndirectedGraph;
83
- keyword: Token<SyntaxKind.GraphKeyword | SyntaxKind.DigraphKeyword>;
84
- strict?: Token<SyntaxKind.StrictKeyword>;
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<SyntaxKind.SemicolonToken>;
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: SyntaxKind.NodeStatement;
99
+ kind: typeof syntaxKind.NodeStatement;
95
100
  id: NodeId;
96
101
  attributes: SyntaxNodeArray<AttributeContainer>;
97
102
  }
98
103
  interface NodeId extends SyntaxNode {
99
- kind: SyntaxKind.NodeId;
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: SyntaxKind.EdgeStatement;
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: SyntaxKind.AttributeStatement;
112
- subject: Token<SyntaxKind.GraphKeyword> | Token<SyntaxKind.NodeKeyword> | Token<SyntaxKind.EdgeKeyword>;
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: SyntaxKind.IdEqualsIdStatement;
121
+ kind: typeof syntaxKind.IdEqualsIdStatement;
117
122
  leftId: Identifier;
118
123
  rightId: Identifier;
119
124
  }
120
125
  interface SubGraph extends SyntaxNode {
121
- kind: SyntaxKind.SubGraph;
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: SyntaxKind.SubGraphStatement;
131
+ kind: typeof syntaxKind.SubGraphStatement;
127
132
  subgraph: SubGraph;
128
133
  }
129
134
  interface EdgeRhs extends SyntaxNode {
130
- kind: SyntaxKind.EdgeRhs;
135
+ kind: typeof syntaxKind.EdgeRhs;
131
136
  operation: EdgeOp;
132
137
  target: EdgeSourceOrTarget;
133
138
  }
134
139
  interface AttributeContainer extends SyntaxNode {
135
- kind: SyntaxKind.AttributeContainer;
136
- openBracket: Token<SyntaxKind.OpenBracketToken>;
140
+ kind: typeof syntaxKind.AttributeContainer;
141
+ openBracket: Token<typeof syntaxKind.OpenBracketToken>;
137
142
  assignments: SyntaxNodeArray<Assignment>;
138
- closeBracket: Token<SyntaxKind.CloseBracketToken>;
143
+ closeBracket: Token<typeof syntaxKind.CloseBracketToken>;
139
144
  }
140
145
  interface Assignment extends SyntaxNode {
141
- kind: SyntaxKind.Assignment;
146
+ kind: typeof syntaxKind.Assignment;
142
147
  leftId: Identifier;
143
148
  rightId: Identifier;
144
149
  terminator?: AssignmentSeparator;
145
150
  }
146
- type AssignmentSeparator = Token<SyntaxKind.SemicolonToken> | Token<SyntaxKind.CommaToken>;
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: SyntaxKind.NormalPortDeclaration;
150
- colon: Token<SyntaxKind.ColonToken>;
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: SyntaxKind.CompassPortDeclaration;
156
- colon: Token<SyntaxKind.ColonToken>;
160
+ kind: typeof syntaxKind.CompassPortDeclaration;
161
+ colon: Token<typeof syntaxKind.ColonToken>;
157
162
  compassPt: CompassPort;
158
163
  }
159
- type CompassPort = Token<SyntaxKind.CompassNorthToken> | Token<SyntaxKind.CompassNorthEastToken> | Token<SyntaxKind.CompassEastToken> | Token<SyntaxKind.CompassSouthEastToken> | Token<SyntaxKind.CompassSouthToken> | Token<SyntaxKind.CompassSouthWestToken> | Token<SyntaxKind.CompassWestToken> | Token<SyntaxKind.CompassNorthWestToken> | Token<SyntaxKind.CompassCenterToken> | Token<SyntaxKind.UnderscoreToken>;
160
- type EdgeOp = Token<SyntaxKind.DirectedEdgeOp> | Token<SyntaxKind.UndirectedEdgeOp>;
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
- declare enum SyntaxKind {
166
- Unknown = 0,
167
- EndOfFileToken = 1,
168
- NewLineTrivia = 2,
169
- WhitespaceTrivia = 3,
170
- HashCommentTrivia = 4,
171
- SingleLineCommentTrivia = 5,
172
- MultiLineCommentTrivia = 6,
173
- CommaToken = 7,
174
- SemicolonToken = 8,
175
- PlusToken = 9,
176
- OpenBraceToken = 10,
177
- CloseBraceToken = 11,
178
- OpenBracketToken = 12,
179
- CloseBracketToken = 13,
180
- ColonToken = 14,
181
- EqualsToken = 15,
182
- LessThan = 16,
183
- GreaterThan = 17,
184
- CompassNorthToken = 18,
185
- CompassNorthEastToken = 19,
186
- CompassEastToken = 20,
187
- CompassSouthEastToken = 21,
188
- CompassSouthToken = 22,
189
- CompassSouthWestToken = 23,
190
- CompassWestToken = 24,
191
- CompassNorthWestToken = 25,
192
- CompassCenterToken = 26,
193
- UnderscoreToken = 27,
194
- StringLiteral = 28,
195
- HtmlIdentifier = 29,
196
- TextIdentifier = 30,
197
- QuotedTextIdentifier = 31,
198
- NumericIdentifier = 32,
199
- GraphKeyword = 33,
200
- DigraphKeyword = 34,
201
- NodeKeyword = 35,
202
- EdgeKeyword = 36,
203
- SubgraphKeyword = 37,
204
- StrictKeyword = 38,
205
- DirectedEdgeOp = 39,
206
- UndirectedEdgeOp = 40,
207
- DirectedGraph = 41,
208
- UndirectedGraph = 42,
209
- NodeStatement = 43,
210
- EdgeStatement = 44,
211
- AttributeStatement = 45,
212
- IdEqualsIdStatement = 46,
213
- SubGraph = 47,
214
- SubGraphStatement = 48,
215
- EdgeRhs = 49,
216
- AttributeContainer = 50,
217
- Assignment = 51,
218
- NormalPortDeclaration = 52,
219
- CompassPortDeclaration = 53,
220
- NodeId = 54,
221
- Count = 55,
222
- FirstNode = 41,
223
- CompassBegin = 18,
224
- CompassEnd = 27,
225
- LastKeyword = 38
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 enum SyntaxNodeFlags {
242
- None = 0,
243
- ContainsErrors = 2,
244
- Synthesized = 4
245
- }
246
- declare const enum GraphContext {
247
- None = 0,
248
- Strict = 2,
249
- Directed = 4,
250
- Undirected = 8
251
- }
252
- declare const enum TokenFlags {
253
- None = 0,
254
- Unterminated = 2,
255
- PrecedingLineBreak = 4
256
- }
257
- declare const enum CharacterCodes {
258
- nullCharacter = 0,
259
- maxAsciiCharacter = 127,
260
- lineFeed = 10,
261
- carriageReturn = 13,
262
- lineSeparator = 8232,
263
- paragraphSeparator = 8233,
264
- nextLine = 133,
265
- space = 32,
266
- nonBreakingSpace = 160,
267
- enQuad = 8192,
268
- emQuad = 8193,
269
- enSpace = 8194,
270
- emSpace = 8195,
271
- threePerEmSpace = 8196,
272
- fourPerEmSpace = 8197,
273
- sixPerEmSpace = 8198,
274
- figureSpace = 8199,
275
- punctuationSpace = 8200,
276
- thinSpace = 8201,
277
- hairSpace = 8202,
278
- zeroWidthSpace = 8203,
279
- narrowNoBreakSpace = 8239,
280
- ideographicSpace = 12288,
281
- mathematicalSpace = 8287,
282
- ogham = 5760,
283
- _ = 95,
284
- $ = 36,
285
- _0 = 48,
286
- _1 = 49,
287
- _2 = 50,
288
- _3 = 51,
289
- _4 = 52,
290
- _5 = 53,
291
- _6 = 54,
292
- _7 = 55,
293
- _8 = 56,
294
- _9 = 57,
295
- a = 97,
296
- b = 98,
297
- c = 99,
298
- d = 100,
299
- e = 101,
300
- f = 102,
301
- g = 103,
302
- h = 104,
303
- i = 105,
304
- j = 106,
305
- k = 107,
306
- l = 108,
307
- m = 109,
308
- n = 110,
309
- o = 111,
310
- p = 112,
311
- q = 113,
312
- r = 114,
313
- s = 115,
314
- t = 116,
315
- u = 117,
316
- v = 118,
317
- w = 119,
318
- x = 120,
319
- y = 121,
320
- z = 122,
321
- A = 65,
322
- B = 66,
323
- C = 67,
324
- D = 68,
325
- E = 69,
326
- F = 70,
327
- G = 71,
328
- H = 72,
329
- I = 73,
330
- J = 74,
331
- K = 75,
332
- L = 76,
333
- M = 77,
334
- N = 78,
335
- O = 79,
336
- P = 80,
337
- Q = 81,
338
- R = 82,
339
- S = 83,
340
- T = 84,
341
- U = 85,
342
- V = 86,
343
- W = 87,
344
- X = 88,
345
- Y = 89,
346
- Z = 90,
347
- ampersand = 38,
348
- asterisk = 42,
349
- at = 64,
350
- backslash = 92,
351
- backtick = 96,
352
- bar = 124,
353
- caret = 94,
354
- closeBrace = 125,
355
- closeBracket = 93,
356
- closeParen = 41,
357
- colon = 58,
358
- comma = 44,
359
- dot = 46,
360
- doubleQuote = 34,
361
- equals = 61,
362
- exclamation = 33,
363
- greaterThan = 62,
364
- hash = 35,
365
- lessThan = 60,
366
- minus = 45,
367
- openBrace = 123,
368
- openBracket = 91,
369
- openParen = 40,
370
- percent = 37,
371
- plus = 43,
372
- question = 63,
373
- semicolon = 59,
374
- singleQuote = 39,
375
- slash = 47,
376
- tilde = 126,
377
- backspace = 8,
378
- formFeed = 12,
379
- byteOrderMark = 65279,
380
- tab = 9,
381
- verticalTab = 11
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 SyntaxKind.SubGraphStatement ? SubGraphStatement : T extends SyntaxKind.AttributeStatement ? AttributeStatement : T extends SyntaxKind.EdgeStatement ? EdgeStatement : T extends SyntaxKind.IdEqualsIdStatement ? IdEqualsIdStatement : T extends SyntaxKind.NodeStatement ? NodeStatement : never;
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
- declare enum ParsingContext {
445
- None = 0,
446
- StatementList = 1,
447
- AttributeContainerList = 2,
448
- AssignmentList = 3,
449
- EdgeRhsList = 4,
450
- QuotedTextIdentifierConcatenation = 5,
451
- Count = 6
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 SyntaxKind.HtmlIdentifier | SyntaxKind.TextIdentifier | SyntaxKind.QuotedTextIdentifier | SyntaxKind.NumericIdentifier;
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 };