@artel/artc 0.9.26075-pre-release → 0.9.26076-pre-release
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/build/Cli.js +3 -3
- package/build/api/Api.js +2 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +57 -57
- package/build/{chunk-DBK277JW.js → chunk-BJOOKURD.js} +1943 -2016
- package/build/{chunk-XEK6QRUU.js → chunk-CXVLWQXS.js} +23 -23
- package/build/{chunk-ADMEZFYB.js → chunk-U4C4P2DL.js} +2 -2
- package/build/types/api/Api.d.ts +2 -2
- package/build/types/common/Name.d.ts +3 -7
- package/build/types/parser/CharacterCodes.d.ts +1 -0
- package/build/types/parser/{a/Scanner.d.ts → Scanner.d.ts} +3 -1
- package/build/types/parser/TokenKind.d.ts +81 -0
- package/build/types/parser/a/ConvertTokenKind.d.ts +1 -1
- package/build/types/parser/m/ConvertTokenKind.d.ts +1 -1
- package/build/types/parser/m/Scanner.d.ts +1 -1
- package/build/types/tree/a/TokenFlags.d.ts +0 -1
- package/build/types/tree/a/TokenKind.d.ts +48 -46
- package/package.json +1 -1
- package/build/types/parser/a/TokenKind.d.ts +0 -78
package/build/Cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
CommandLineCompiler
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-U4C4P2DL.js";
|
|
5
|
+
import "./chunk-CXVLWQXS.js";
|
|
6
6
|
import {
|
|
7
7
|
__async
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BJOOKURD.js";
|
|
9
9
|
|
|
10
10
|
// source/Cli.ts
|
|
11
11
|
function main() {
|
package/build/api/Api.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
ImportEmitKind,
|
|
9
9
|
NotEmittedPackageInfo,
|
|
10
10
|
SourceMapMode
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-CXVLWQXS.js";
|
|
12
12
|
import {
|
|
13
13
|
AccessKind,
|
|
14
14
|
AccessedFunction_entity,
|
|
@@ -329,7 +329,7 @@ import {
|
|
|
329
329
|
withoutQuotes,
|
|
330
330
|
withoutTemplateQuotes,
|
|
331
331
|
yieldTask
|
|
332
|
-
} from "../chunk-
|
|
332
|
+
} from "../chunk-BJOOKURD.js";
|
|
333
333
|
export {
|
|
334
334
|
AccessKind,
|
|
335
335
|
AccessedFunction_entity,
|
package/build/api/ApiNodeJS.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
PhysicalFileSystem,
|
|
7
7
|
PhysicalTypeScriptLibrariesProvider,
|
|
8
8
|
PrintingDiagnosticAcceptor
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-U4C4P2DL.js";
|
|
10
|
+
import "../chunk-CXVLWQXS.js";
|
|
11
|
+
import "../chunk-BJOOKURD.js";
|
|
12
12
|
export {
|
|
13
13
|
CommandLineCompiler,
|
|
14
14
|
FileSystemUri,
|
package/build/api/ApiServices.js
CHANGED
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
traverseTreeAsync,
|
|
148
148
|
traverseTreeAsync2,
|
|
149
149
|
yieldTask
|
|
150
|
-
} from "../chunk-
|
|
150
|
+
} from "../chunk-BJOOKURD.js";
|
|
151
151
|
|
|
152
152
|
// source/services/common/Types.ts
|
|
153
153
|
import * as ls from "vscode-languageserver";
|
|
@@ -2751,18 +2751,18 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
2751
2751
|
if (tokenOrKeyword.isKeyword(23 /* Import */) && tokenOrKeyword.parent.kind === 5 /* SinglePackageImportDirective */) {
|
|
2752
2752
|
return new PackageImportCompletionContext([], void 0);
|
|
2753
2753
|
}
|
|
2754
|
-
if (tokenOrKeyword.isToken(
|
|
2754
|
+
if (tokenOrKeyword.isToken(66 /* Equals */) && tokenOrKeyword.parent.kind === 8 /* PackageImport */) {
|
|
2755
2755
|
return new PackageImportCompletionContext([], void 0);
|
|
2756
2756
|
}
|
|
2757
|
-
if (tokenOrKeyword.isToken(
|
|
2757
|
+
if (tokenOrKeyword.isToken(36 /* Dot */) && tokenOrKeyword.parent.kind === 9 /* PackageName */) {
|
|
2758
2758
|
const packageImport = tokenOrKeyword.parent.parent;
|
|
2759
2759
|
const precedingSegmentNames = packageImport.packageName.segments.takeWhile((s) => s.rangeWithTrivia.start < tokenOrKeyword.value.rangeWithTrivia.start).map((p) => this.analyzer.createNameFromIdentifier(p)).toArray();
|
|
2760
2760
|
return new PackageImportCompletionContext(precedingSegmentNames, void 0);
|
|
2761
2761
|
}
|
|
2762
|
-
if (tokenOrKeyword.isToken(
|
|
2762
|
+
if (tokenOrKeyword.isToken(51 /* OpenBrace */) && tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || this.tokenOrKeywordIsPackageImportListChild(tokenOrKeyword)) {
|
|
2763
2763
|
return new PackageImportCompletionContext([], void 0);
|
|
2764
2764
|
}
|
|
2765
|
-
if (tokenOrKeyword.isToken(
|
|
2765
|
+
if (tokenOrKeyword.isToken(36 /* Dot */) && tokenOrKeyword.parent.kind === 71 /* MemberAccessExpression */) {
|
|
2766
2766
|
const memberAccess = tokenOrKeyword.parent;
|
|
2767
2767
|
{
|
|
2768
2768
|
const packageTreeNode = this.analyzer.getDenotedPackageNameTreeNode(memberAccess.expression);
|
|
@@ -2796,7 +2796,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
2796
2796
|
const lookupContext = semanticContext.getTypeMemberLookupContext();
|
|
2797
2797
|
return new TypeMemberCompletionContext(type, lookupContext, lookupOptions);
|
|
2798
2798
|
}
|
|
2799
|
-
if (tokenOrKeyword.isToken(
|
|
2799
|
+
if (tokenOrKeyword.isToken(36 /* Dot */) && tokenOrKeyword.parent.kind === 132 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 10 /* NamedTypeSpecifier */) {
|
|
2800
2800
|
const namedTypeSpecifier = tokenOrKeyword.parent.parent;
|
|
2801
2801
|
const resolutionResult = this.analyzer.resolveNamedTypeSpecifier(namedTypeSpecifier);
|
|
2802
2802
|
const segmentIndex = Math.floor(
|
|
@@ -2835,7 +2835,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
2835
2835
|
}
|
|
2836
2836
|
return { kind: "none" };
|
|
2837
2837
|
}
|
|
2838
|
-
if (tokenOrKeyword.isToken(
|
|
2838
|
+
if (tokenOrKeyword.isToken(36 /* Dot */) && tokenOrKeyword.parent.kind === 132 /* QualifiedName */ && tokenOrKeyword.parent.parent.kind === 149 /* Tag */) {
|
|
2839
2839
|
const tag = tokenOrKeyword.parent.parent;
|
|
2840
2840
|
const resolutionResult = this.analyzer.resolveTag(tag);
|
|
2841
2841
|
const segmentIndex = Math.floor(
|
|
@@ -3253,7 +3253,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
3253
3253
|
return false;
|
|
3254
3254
|
}
|
|
3255
3255
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3256
|
-
return tokenOrKeyword.isToken(
|
|
3256
|
+
return tokenOrKeyword.isToken(30 /* CloseBrace */) && tokenOrKeyword.parent.kind === 91 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 112 /* LoopStatement */;
|
|
3257
3257
|
}
|
|
3258
3258
|
static {
|
|
3259
3259
|
this.packageLevelHidingLevelKinds = [
|
|
@@ -3280,7 +3280,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
3280
3280
|
return void 0;
|
|
3281
3281
|
}
|
|
3282
3282
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3283
|
-
if (!(tokenOrKeyword.isToken(
|
|
3283
|
+
if (!(tokenOrKeyword.isToken(52 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 151 /* Modifier */)) {
|
|
3284
3284
|
return void 0;
|
|
3285
3285
|
}
|
|
3286
3286
|
const modifier = tokenOrKeyword.parent;
|
|
@@ -3309,24 +3309,24 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
3309
3309
|
return false;
|
|
3310
3310
|
}
|
|
3311
3311
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3312
|
-
return tokenOrKeyword.isToken(
|
|
3312
|
+
return tokenOrKeyword.isToken(30 /* CloseBrace */) && tokenOrKeyword.parent.kind === 91 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 105 /* IfStatement */ && tokenOrKeyword.parent === tokenOrKeyword.parent.parent.block || tokenOrKeyword.parent.parent.kind === 107 /* ElseIfClause */);
|
|
3313
3313
|
}
|
|
3314
3314
|
isCatchKeywordContext(positionDescription) {
|
|
3315
3315
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
3316
3316
|
return false;
|
|
3317
3317
|
}
|
|
3318
3318
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3319
|
-
return tokenOrKeyword.isToken(
|
|
3319
|
+
return tokenOrKeyword.isToken(30 /* CloseBrace */) && tokenOrKeyword.parent.kind === 91 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 97 /* TryStatement */;
|
|
3320
3320
|
}
|
|
3321
3321
|
isFinallyKeywordContext(positionDescription) {
|
|
3322
3322
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
3323
3323
|
return false;
|
|
3324
3324
|
}
|
|
3325
3325
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3326
|
-
return tokenOrKeyword.isToken(
|
|
3326
|
+
return tokenOrKeyword.isToken(30 /* CloseBrace */) && tokenOrKeyword.parent.kind === 91 /* StatementBlock */ && (tokenOrKeyword.parent.parent.kind === 97 /* TryStatement */ || tokenOrKeyword.parent.parent.kind === 98 /* CatchClause */);
|
|
3327
3327
|
}
|
|
3328
3328
|
isAliasedTypeCompletionContext(positionDescription) {
|
|
3329
|
-
return positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(
|
|
3329
|
+
return positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(66 /* Equals */) && isPackageTypeDeclaration(positionDescription.tokenOrKeyword.parent);
|
|
3330
3330
|
}
|
|
3331
3331
|
isExtendsKeywordCompletionContext(positionDescription) {
|
|
3332
3332
|
if (positionDescription.kind !== "after-token-or-keyword") {
|
|
@@ -3336,7 +3336,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
3336
3336
|
if (tokenOrKeyword.isToken(9 /* Identifier */) && isPackageStructuredTypeDeclaration(tokenOrKeyword.parent)) {
|
|
3337
3337
|
return true;
|
|
3338
3338
|
}
|
|
3339
|
-
if (tokenOrKeyword.isToken(
|
|
3339
|
+
if (tokenOrKeyword.isToken(42 /* GreaterThan */) && tokenOrKeyword.parent.kind === 156 /* TypeParameterClause */ && isPackageStructuredTypeDeclaration(tokenOrKeyword.parent.parent)) {
|
|
3340
3340
|
return true;
|
|
3341
3341
|
}
|
|
3342
3342
|
if (tokenOrKeyword.isKeyword(3 /* Class */) && isAnonymousStructuredTypeDeclaration(tokenOrKeyword.parent)) {
|
|
@@ -3358,7 +3358,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
3358
3358
|
if (tokenOrKeyword.isToken(9 /* Identifier */) && isPackageAspectOrReducedTypeDeclaration(tokenOrKeyword.parent)) {
|
|
3359
3359
|
return true;
|
|
3360
3360
|
}
|
|
3361
|
-
if (tokenOrKeyword.isToken(
|
|
3361
|
+
if (tokenOrKeyword.isToken(42 /* GreaterThan */) && tokenOrKeyword.parent.kind === 156 /* TypeParameterClause */ && isPackageAspectOrReducedTypeDeclaration(tokenOrKeyword.parent.parent)) {
|
|
3362
3362
|
return true;
|
|
3363
3363
|
}
|
|
3364
3364
|
return false;
|
|
@@ -3371,7 +3371,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
3371
3371
|
if (tokenOrKeyword.isToken(9 /* Identifier */) && isPackageStructuredTypeDeclaration(tokenOrKeyword.parent)) {
|
|
3372
3372
|
return true;
|
|
3373
3373
|
}
|
|
3374
|
-
if (tokenOrKeyword.isToken(
|
|
3374
|
+
if (tokenOrKeyword.isToken(42 /* GreaterThan */) && tokenOrKeyword.parent.kind === 156 /* TypeParameterClause */ && isPackageStructuredTypeDeclaration(tokenOrKeyword.parent.parent)) {
|
|
3375
3375
|
return true;
|
|
3376
3376
|
}
|
|
3377
3377
|
const namedTypeSpecifier = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
|
|
@@ -3381,7 +3381,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
3381
3381
|
if (namedTypeSpecifier?.parent.kind === 24 /* BaseTypeList */ && namedTypeSpecifier.parent.parent.kind === 159 /* ExtendsClause */) {
|
|
3382
3382
|
return true;
|
|
3383
3383
|
}
|
|
3384
|
-
if (tokenOrKeyword.isToken(
|
|
3384
|
+
if (tokenOrKeyword.isToken(34 /* Comma */) && tokenOrKeyword?.parent.kind === 24 /* BaseTypeList */ && tokenOrKeyword.parent.parent.kind === 159 /* ExtendsClause */) {
|
|
3385
3385
|
return true;
|
|
3386
3386
|
}
|
|
3387
3387
|
return false;
|
|
@@ -3398,7 +3398,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
3398
3398
|
return false;
|
|
3399
3399
|
}
|
|
3400
3400
|
const tokenOrKeyword = positionDescription.tokenOrKeyword;
|
|
3401
|
-
if (tokenOrKeyword.isToken(
|
|
3401
|
+
if (tokenOrKeyword.isToken(30 /* CloseBrace */) && tokenOrKeyword.parent.kind === 91 /* StatementBlock */ && tokenOrKeyword.parent.parent.kind === 117 /* CaseClause */) {
|
|
3402
3402
|
return true;
|
|
3403
3403
|
}
|
|
3404
3404
|
if (syntaxContext.precedingExpression !== void 0 && syntaxContext.precedingExpression.parent.kind === 115 /* SwitchStatement */) {
|
|
@@ -3414,7 +3414,7 @@ var CompletionServiceA = class _CompletionServiceA {
|
|
|
3414
3414
|
if (tokenOrKeyword.isToken(9 /* Identifier */) && tokenOrKeyword.parent.kind === 36 /* TypeExtensionDeclaration */) {
|
|
3415
3415
|
return true;
|
|
3416
3416
|
}
|
|
3417
|
-
if (tokenOrKeyword.isToken(
|
|
3417
|
+
if (tokenOrKeyword.isToken(42 /* GreaterThan */) && tokenOrKeyword.parent.kind === 156 /* TypeParameterClause */ && tokenOrKeyword.parent.parent.kind === 36 /* TypeExtensionDeclaration */) {
|
|
3418
3418
|
return true;
|
|
3419
3419
|
}
|
|
3420
3420
|
return false;
|
|
@@ -4680,7 +4680,7 @@ var SyntaxContextFactory = class {
|
|
|
4680
4680
|
if (positionDescription.kind === "after-token-or-keyword") {
|
|
4681
4681
|
unqualifiedTypeContext = this.getUnqualifiedTypeContext(positionDescription.tokenOrKeyword);
|
|
4682
4682
|
}
|
|
4683
|
-
const isUnqualifiedTagNameCompletionContext = positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(
|
|
4683
|
+
const isUnqualifiedTagNameCompletionContext = positionDescription.kind === "after-token-or-keyword" && positionDescription.tokenOrKeyword.isToken(44 /* HashSign */) && positionDescription.tokenOrKeyword.parent.kind === 149 /* Tag */;
|
|
4684
4684
|
let topLevelTranslationListContext;
|
|
4685
4685
|
if (positionDescription.kind === "after-token-or-keyword") {
|
|
4686
4686
|
topLevelTranslationListContext = this.getTopLevelTranslationListContext(positionDescription.tokenOrKeyword);
|
|
@@ -4705,7 +4705,7 @@ var SyntaxContextFactory = class {
|
|
|
4705
4705
|
);
|
|
4706
4706
|
}
|
|
4707
4707
|
static isExpressionOrStatementContext(tokenOrKeyword) {
|
|
4708
|
-
if (tokenOrKeyword.isToken(
|
|
4708
|
+
if (tokenOrKeyword.isToken(66 /* Equals */)) {
|
|
4709
4709
|
if (tokenOrKeyword.parent.kind === 33 /* InitializationClause */) {
|
|
4710
4710
|
const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.value);
|
|
4711
4711
|
return { expressionContext: { expressionRole }, isStatementContext: false };
|
|
@@ -4747,16 +4747,16 @@ var SyntaxContextFactory = class {
|
|
|
4747
4747
|
isStatementContext: false
|
|
4748
4748
|
};
|
|
4749
4749
|
}
|
|
4750
|
-
if (tokenOrKeyword.isToken(
|
|
4750
|
+
if (tokenOrKeyword.isToken(51 /* OpenBrace */) && (tokenOrKeyword.parent.kind === 91 /* StatementBlock */ || tokenOrKeyword.parent.kind === 92 /* FunctionBlock */)) {
|
|
4751
4751
|
return {
|
|
4752
4752
|
expressionContext: { expressionRole: new ExpressionRole_other(void 0) },
|
|
4753
4753
|
isStatementContext: true
|
|
4754
4754
|
};
|
|
4755
4755
|
}
|
|
4756
|
-
if (tokenOrKeyword.isToken(
|
|
4756
|
+
if (tokenOrKeyword.isToken(60 /* Semicolon */) && tokenOrKeyword.parent.kind === 90 /* StatementList */) {
|
|
4757
4757
|
return { expressionContext: { expressionRole: new ExpressionRole_other(void 0) }, isStatementContext: true };
|
|
4758
4758
|
}
|
|
4759
|
-
if (tokenOrKeyword.isToken(
|
|
4759
|
+
if (tokenOrKeyword.isToken(52 /* OpenParenthesis */)) {
|
|
4760
4760
|
if (tokenOrKeyword.parent.kind === 68 /* ParenthesizedExpression */) {
|
|
4761
4761
|
const expressionRole = new ExpressionRole_other(tokenOrKeyword.parent.expression);
|
|
4762
4762
|
return { expressionContext: { expressionRole }, isStatementContext: false };
|
|
@@ -4789,15 +4789,15 @@ var SyntaxContextFactory = class {
|
|
|
4789
4789
|
return { expressionContext: { expressionRole }, isStatementContext: false };
|
|
4790
4790
|
}
|
|
4791
4791
|
}
|
|
4792
|
-
if (tokenOrKeyword.isToken(
|
|
4792
|
+
if (tokenOrKeyword.isToken(53 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 65 /* IndexedAccessExpression */) {
|
|
4793
4793
|
const expressionRole = new ExpressionRole_argument(tokenOrKeyword.parent.argumentList, 0);
|
|
4794
4794
|
return { expressionContext: { expressionRole }, isStatementContext: false };
|
|
4795
4795
|
}
|
|
4796
|
-
if (tokenOrKeyword.isToken(
|
|
4796
|
+
if (tokenOrKeyword.isToken(53 /* OpenSquareBracket */) && tokenOrKeyword.parent.kind === 54 /* ArrayLiteral */) {
|
|
4797
4797
|
const expressionRole = new ExpressionRole_arrayElement(tokenOrKeyword.parent);
|
|
4798
4798
|
return { expressionContext: { expressionRole }, isStatementContext: false };
|
|
4799
4799
|
}
|
|
4800
|
-
if (tokenOrKeyword.isToken(
|
|
4800
|
+
if (tokenOrKeyword.isToken(34 /* Comma */)) {
|
|
4801
4801
|
if (tokenOrKeyword.parent.kind === 62 /* ArgumentList */) {
|
|
4802
4802
|
const argumentList = tokenOrKeyword.parent;
|
|
4803
4803
|
let index = 0;
|
|
@@ -4906,16 +4906,16 @@ var SyntaxContextFactory = class {
|
|
|
4906
4906
|
];
|
|
4907
4907
|
}
|
|
4908
4908
|
static isPackageMemberDeclarationListContext(tokenOrKeyword) {
|
|
4909
|
-
if (tokenOrKeyword.isToken(
|
|
4909
|
+
if (tokenOrKeyword.isToken(60 /* Semicolon */) && (tokenOrKeyword.parent.kind === 2 /* PackageMemberDeclarationList */ || tokenOrKeyword.parent.kind === 4 /* PackageImportDirectiveList */)) {
|
|
4910
4910
|
return true;
|
|
4911
4911
|
}
|
|
4912
|
-
if (tokenOrKeyword.isToken(
|
|
4912
|
+
if (tokenOrKeyword.isToken(30 /* CloseBrace */) && tokenOrKeyword.parent.kind === 26 /* TypeMemberDeclarationBlock */ && (tokenOrKeyword.parent.parent.kind === 36 /* TypeExtensionDeclaration */ || isPackageTypeDeclaration(tokenOrKeyword.parent.parent))) {
|
|
4913
4913
|
return true;
|
|
4914
4914
|
}
|
|
4915
|
-
if (tokenOrKeyword.isToken(
|
|
4915
|
+
if (tokenOrKeyword.isToken(30 /* CloseBrace */) && (tokenOrKeyword.parent.kind === 120 /* TranslationsDeclaration */ || tokenOrKeyword.parent.kind === 20 /* PackageMemberGroupDeclaration */ || tokenOrKeyword.parent.kind === 6 /* PackageGroupImportDirective */ || tokenOrKeyword.parent.kind === 92 /* FunctionBlock */ && (tokenOrKeyword.parent.parent.kind === 21 /* PackageConstructorDeclaration */ || tokenOrKeyword.parent.parent.kind === 22 /* PackageEntryPointDeclaration */ || tokenOrKeyword.parent.parent.kind === 23 /* PackageFunctionDeclaration */))) {
|
|
4916
4916
|
return true;
|
|
4917
4917
|
}
|
|
4918
|
-
if (tokenOrKeyword.isToken(
|
|
4918
|
+
if (tokenOrKeyword.isToken(51 /* OpenBrace */) && tokenOrKeyword.parent.kind === 20 /* PackageMemberGroupDeclaration */) {
|
|
4919
4919
|
return true;
|
|
4920
4920
|
}
|
|
4921
4921
|
if (this.packageDeclarations.some((kind) => SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, kind))) {
|
|
@@ -4924,7 +4924,7 @@ var SyntaxContextFactory = class {
|
|
|
4924
4924
|
if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 151 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
|
|
4925
4925
|
return true;
|
|
4926
4926
|
}
|
|
4927
|
-
if (tokenOrKeyword.isToken(
|
|
4927
|
+
if (tokenOrKeyword.isToken(31 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 151 /* Modifier */ && isPackageMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
|
|
4928
4928
|
return true;
|
|
4929
4929
|
}
|
|
4930
4930
|
const tag = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 149 /* Tag */);
|
|
@@ -4949,13 +4949,13 @@ var SyntaxContextFactory = class {
|
|
|
4949
4949
|
];
|
|
4950
4950
|
}
|
|
4951
4951
|
static isTypeMemberDeclarationListContext(tokenOrKeyword) {
|
|
4952
|
-
if (tokenOrKeyword.isToken(
|
|
4952
|
+
if (tokenOrKeyword.isToken(60 /* Semicolon */) && tokenOrKeyword.parent.kind === 25 /* TypeMemberDeclarationList */) {
|
|
4953
4953
|
return true;
|
|
4954
4954
|
}
|
|
4955
|
-
if (tokenOrKeyword.isToken(
|
|
4955
|
+
if (tokenOrKeyword.isToken(51 /* OpenBrace */) && tokenOrKeyword.parent.kind === 26 /* TypeMemberDeclarationBlock */) {
|
|
4956
4956
|
return true;
|
|
4957
4957
|
}
|
|
4958
|
-
if (tokenOrKeyword.isToken(
|
|
4958
|
+
if (tokenOrKeyword.isToken(30 /* CloseBrace */) && tokenOrKeyword.parent.kind === 26 /* TypeMemberDeclarationBlock */ && tokenOrKeyword.parent.parent.kind === 38 /* TypeMemberGroupDeclaration */) {
|
|
4959
4959
|
return true;
|
|
4960
4960
|
}
|
|
4961
4961
|
if (this.typeDeclarations.some((nodeKind) => SyntaxContextUtils.tokenOrKeywordIsValidEndOfNode(tokenOrKeyword, nodeKind))) {
|
|
@@ -4964,7 +4964,7 @@ var SyntaxContextFactory = class {
|
|
|
4964
4964
|
if (tokenOrKeyword.isKeyword() && tokenOrKeyword.parent.kind === 151 /* Modifier */ && tokenOrKeyword.value === tokenOrKeyword.parent.value && tokenOrKeyword.parent.openParenthesisToken === void 0 && isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
|
|
4965
4965
|
return true;
|
|
4966
4966
|
}
|
|
4967
|
-
if (tokenOrKeyword.isToken(
|
|
4967
|
+
if (tokenOrKeyword.isToken(31 /* CloseParenthesis */) && tokenOrKeyword.parent.kind === 151 /* Modifier */ && isTypeMemberDeclaration(tokenOrKeyword.parent.parent.parent)) {
|
|
4968
4968
|
return true;
|
|
4969
4969
|
}
|
|
4970
4970
|
const tag = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 149 /* Tag */);
|
|
@@ -5005,7 +5005,7 @@ var SyntaxContextFactory = class {
|
|
|
5005
5005
|
return result;
|
|
5006
5006
|
}
|
|
5007
5007
|
static getUnqualifiedTypeContext(tokenOrKeyword) {
|
|
5008
|
-
if (tokenOrKeyword.isToken(
|
|
5008
|
+
if (tokenOrKeyword.isToken(33 /* Colon */) && tokenOrKeyword.parent.kind === 158 /* TypeAnnotation */) {
|
|
5009
5009
|
return { allowsAnonymousTypes: true };
|
|
5010
5010
|
}
|
|
5011
5011
|
if (tokenOrKeyword.isKeyword(10 /* Extends */) && (tokenOrKeyword.parent.kind === 159 /* ExtendsClause */ || tokenOrKeyword.parent.kind === 145 /* TypeParameterDeclaration */)) {
|
|
@@ -5020,16 +5020,16 @@ var SyntaxContextFactory = class {
|
|
|
5020
5020
|
if (tokenOrKeyword.isKeyword(7 /* ToType */) && tokenOrKeyword.parent.kind === 36 /* TypeExtensionDeclaration */) {
|
|
5021
5021
|
return { allowsAnonymousTypes: false };
|
|
5022
5022
|
}
|
|
5023
|
-
if (tokenOrKeyword.isToken(
|
|
5023
|
+
if (tokenOrKeyword.isToken(46 /* LessThan */) && tokenOrKeyword.parent.kind === 154 /* TypeArgumentClause */) {
|
|
5024
5024
|
return { allowsAnonymousTypes: true };
|
|
5025
5025
|
}
|
|
5026
|
-
if (tokenOrKeyword.isToken(
|
|
5026
|
+
if (tokenOrKeyword.isToken(34 /* Comma */) && (tokenOrKeyword.parent.kind === 24 /* BaseTypeList */ || tokenOrKeyword.parent.kind === 155 /* TypeArgumentList */)) {
|
|
5027
5027
|
return { allowsAnonymousTypes: tokenOrKeyword.parent.kind === 155 /* TypeArgumentList */ };
|
|
5028
5028
|
}
|
|
5029
|
-
if ((tokenOrKeyword.isToken(
|
|
5029
|
+
if ((tokenOrKeyword.isToken(33 /* Colon */) || tokenOrKeyword.isToken(66 /* Equals */)) && tokenOrKeyword.parent.kind === 145 /* TypeParameterDeclaration */) {
|
|
5030
5030
|
return { allowsAnonymousTypes: false };
|
|
5031
5031
|
}
|
|
5032
|
-
if (tokenOrKeyword.isToken(
|
|
5032
|
+
if (tokenOrKeyword.isToken(66 /* Equals */) && tokenOrKeyword.parent.kind === 19 /* PackageAliasTypeDeclaration */) {
|
|
5033
5033
|
return { allowsAnonymousTypes: false };
|
|
5034
5034
|
}
|
|
5035
5035
|
if (tokenOrKeyword.isKeyword(20 /* Is */) && tokenOrKeyword.parent.kind === 67 /* IsExpression */) {
|
|
@@ -5044,16 +5044,16 @@ var SyntaxContextFactory = class {
|
|
|
5044
5044
|
if (tokenOrKeyword.isToken(10 /* Ampersand */) && tokenOrKeyword.parent.kind === 12 /* IntersectionTypeSpecifier */) {
|
|
5045
5045
|
return { allowsAnonymousTypes: false };
|
|
5046
5046
|
}
|
|
5047
|
-
if (tokenOrKeyword.isToken(
|
|
5047
|
+
if (tokenOrKeyword.isToken(52 /* OpenParenthesis */) && tokenOrKeyword.parent.kind === 13 /* ParenthesizedTypeSpecifier */) {
|
|
5048
5048
|
return { allowsAnonymousTypes: true };
|
|
5049
5049
|
}
|
|
5050
5050
|
return void 0;
|
|
5051
5051
|
}
|
|
5052
5052
|
static getTopLevelTranslationListContext(tokenOrKeyword) {
|
|
5053
|
-
if (tokenOrKeyword.isToken(
|
|
5053
|
+
if (tokenOrKeyword.isToken(60 /* Semicolon */) && tokenOrKeyword.parent.kind === 121 /* TopLevelTranslationList */) {
|
|
5054
5054
|
return { translationsDeclaration: tokenOrKeyword.parent.parent };
|
|
5055
5055
|
}
|
|
5056
|
-
if (tokenOrKeyword.isToken(
|
|
5056
|
+
if (tokenOrKeyword.isToken(51 /* OpenBrace */) && tokenOrKeyword.parent.kind === 120 /* TranslationsDeclaration */) {
|
|
5057
5057
|
return { translationsDeclaration: tokenOrKeyword.parent };
|
|
5058
5058
|
}
|
|
5059
5059
|
const type = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(
|
|
@@ -5087,10 +5087,10 @@ var SyntaxContextFactory = class {
|
|
|
5087
5087
|
return void 0;
|
|
5088
5088
|
}
|
|
5089
5089
|
static getTypeMemberTranslationListContext(tokenOrKeyword) {
|
|
5090
|
-
if (tokenOrKeyword.isToken(
|
|
5090
|
+
if (tokenOrKeyword.isToken(60 /* Semicolon */) && tokenOrKeyword.parent.kind === 135 /* TypeMemberTranslationList */) {
|
|
5091
5091
|
return { typeTranslation: tokenOrKeyword.parent.parent };
|
|
5092
5092
|
}
|
|
5093
|
-
if (tokenOrKeyword.isToken(
|
|
5093
|
+
if (tokenOrKeyword.isToken(51 /* OpenBrace */) && tokenOrKeyword.parent.kind === 136 /* TypeTranslationDeclaration */) {
|
|
5094
5094
|
return { typeTranslation: tokenOrKeyword.parent };
|
|
5095
5095
|
}
|
|
5096
5096
|
const indexer = SyntaxContextUtils.ifTokenIsValidEndOfNodeThenNode(tokenOrKeyword, 126 /* IndexerTranslation */);
|
|
@@ -5502,9 +5502,9 @@ var NodeSemanticInfoServiceA = class extends NodeSemanticInfoService {
|
|
|
5502
5502
|
return this.ofPrefixUnaryExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
5503
5503
|
} else if (tokenOrKeyword.parent.kind === 59 /* BinaryExpression */) {
|
|
5504
5504
|
return this.ofBinaryExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
5505
|
-
} else if (tokenOrKeyword.isToken(
|
|
5505
|
+
} else if (tokenOrKeyword.isToken(29 /* Caret */) && (tokenOrKeyword.parent.kind === 44 /* DereferencedVariableGetterDeclaration */ || tokenOrKeyword.parent.kind === 45 /* DereferencedVariableSetterDeclaration */)) {
|
|
5506
5506
|
return this.ofDereferencedVariableAccessorDeclaration(analyzer, tokenOrKeyword.parent);
|
|
5507
|
-
} else if (tokenOrKeyword.isToken(
|
|
5507
|
+
} else if (tokenOrKeyword.isToken(29 /* Caret */) && tokenOrKeyword.parent.kind === 73 /* DereferenceExpression */) {
|
|
5508
5508
|
return this.ofDereferenceExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
5509
5509
|
} else if (tokenOrKeyword.parent.kind === 89 /* AssignmentStatement */) {
|
|
5510
5510
|
return this.ofAssignmentStatementOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
@@ -5514,7 +5514,7 @@ var NodeSemanticInfoServiceA = class extends NodeSemanticInfoService {
|
|
|
5514
5514
|
return this.ofDefaultMatchExpression(analyzer, tokenOrKeyword.parent);
|
|
5515
5515
|
} else if (tokenOrKeyword.isKeyword(18 /* Function */) && tokenOrKeyword.parent.kind === 60 /* FunctionLiteral */) {
|
|
5516
5516
|
return this.ofRegularOrBlockFunctionLiteral(analyzer, tokenOrKeyword.parent);
|
|
5517
|
-
} else if (tokenOrKeyword.isToken(
|
|
5517
|
+
} else if (tokenOrKeyword.isToken(51 /* OpenBrace */) && tokenOrKeyword.parent.kind === 92 /* FunctionBlock */ && tokenOrKeyword.parent.parent.kind === 61 /* FunctionBlockLiteral */) {
|
|
5518
5518
|
return this.ofRegularOrBlockFunctionLiteral(analyzer, tokenOrKeyword.parent.parent);
|
|
5519
5519
|
} else if (tokenOrKeyword.isKeyword(62 /* Base */) && tokenOrKeyword.parent.kind === 87 /* BaseConstructorCallStatement */) {
|
|
5520
5520
|
return this.ofBaseConstructorCallStatement(analyzer, tokenOrKeyword.parent, options7);
|
|
@@ -5524,19 +5524,19 @@ var NodeSemanticInfoServiceA = class extends NodeSemanticInfoService {
|
|
|
5524
5524
|
return this.ofObjectExpression(analyzer, tokenOrKeyword.parent, options7);
|
|
5525
5525
|
} else if (tokenOrKeyword.isKeyword(62 /* Base */) && tokenOrKeyword.parent.kind === 83 /* BaseExpression */) {
|
|
5526
5526
|
return this.ofBaseExpression(analyzer, tokenOrKeyword.parent, options7);
|
|
5527
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5527
|
+
} else if ((tokenOrKeyword.isToken(53 /* OpenSquareBracket */) || tokenOrKeyword.isToken(32 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 43 /* IndexParameterClause */) {
|
|
5528
5528
|
return this.ofIndexedElementAccessorDeclaration(analyzer, tokenOrKeyword.parent.parent);
|
|
5529
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5529
|
+
} else if ((tokenOrKeyword.isToken(53 /* OpenSquareBracket */) || tokenOrKeyword.isToken(32 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 65 /* IndexedAccessExpression */) {
|
|
5530
5530
|
return this.ofIndexedAccessExpressionOperator(analyzer, tokenOrKeyword.parent, options7);
|
|
5531
5531
|
} else if (tokenOrKeyword.isKeyword(36 /* Creation */) && tokenOrKeyword.parent.kind === 124 /* ConstructorTranslation */) {
|
|
5532
5532
|
return this.ofConstructorTranslationSourceConstructor(analyzer, tokenOrKeyword.parent, options7);
|
|
5533
5533
|
} else if (tokenOrKeyword.isKeyword(8 /* Object */) && tokenOrKeyword.parent.kind === 146 /* ParameterDeclaration */) {
|
|
5534
5534
|
return this.ofObjectParameterDeclaration(analyzer, tokenOrKeyword.parent, tokenOrKeyword.value);
|
|
5535
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5535
|
+
} else if ((tokenOrKeyword.isToken(52 /* OpenParenthesis */) || tokenOrKeyword.isToken(31 /* CloseParenthesis */)) && tokenOrKeyword.parent.kind === 123 /* TranslationParameterClause */ && tokenOrKeyword.parent.parent.kind === 124 /* ConstructorTranslation */ && tokenOrKeyword.parent.parent.translatedParameterClause === tokenOrKeyword.parent) {
|
|
5536
5536
|
return this.ofConstructorTranslationTranslatedConstructor(analyzer, tokenOrKeyword.parent.parent, options7);
|
|
5537
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5537
|
+
} else if ((tokenOrKeyword.isToken(53 /* OpenSquareBracket */) || tokenOrKeyword.isToken(32 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 125 /* IndexParameterTranslationClause */ && tokenOrKeyword.parent.parent.kind === 126 /* IndexerTranslation */ && tokenOrKeyword.parent.parent.sourceParameterClause === tokenOrKeyword.parent) {
|
|
5538
5538
|
return this.ofIndexerTranslationSourceIndexer(analyzer, tokenOrKeyword.parent.parent, options7);
|
|
5539
|
-
} else if ((tokenOrKeyword.isToken(
|
|
5539
|
+
} else if ((tokenOrKeyword.isToken(53 /* OpenSquareBracket */) || tokenOrKeyword.isToken(32 /* CloseSquareBracket */)) && tokenOrKeyword.parent.kind === 125 /* IndexParameterTranslationClause */ && tokenOrKeyword.parent.parent.kind === 126 /* IndexerTranslation */ && tokenOrKeyword.parent.parent.translatedParameterClause === tokenOrKeyword.parent) {
|
|
5540
5540
|
return this.ofIndexerTranslationTranslatedIndexer(analyzer, tokenOrKeyword.parent.parent, options7);
|
|
5541
5541
|
}
|
|
5542
5542
|
return void 0;
|
|
@@ -6937,7 +6937,7 @@ var DefinitionServiceA = class extends DefinitionService {
|
|
|
6937
6937
|
const tokenOrKeyword = getTokenOrKeywordsTouchingOffset(sourceFile.getSyntaxNode(), offset).getSingleWithHighestPriority((t) => {
|
|
6938
6938
|
if (t.isToken(9 /* Identifier */) || t.isKeyword()) {
|
|
6939
6939
|
return 2;
|
|
6940
|
-
} else if (t.isToken(
|
|
6940
|
+
} else if (t.isToken(29 /* Caret */) || t.isToken(53 /* OpenSquareBracket */) || t.isToken(32 /* CloseSquareBracket */)) {
|
|
6941
6941
|
return 1;
|
|
6942
6942
|
} else {
|
|
6943
6943
|
return 0;
|
|
@@ -7412,7 +7412,7 @@ var HoverServiceA = class extends HoverService {
|
|
|
7412
7412
|
return 2;
|
|
7413
7413
|
} else if (t.isToken(13 /* Asterisk */)) {
|
|
7414
7414
|
return 1;
|
|
7415
|
-
} else if (t.isToken(
|
|
7415
|
+
} else if (t.isToken(29 /* Caret */) || t.isToken(53 /* OpenSquareBracket */) || t.isToken(32 /* CloseSquareBracket */) || t.isToken(51 /* OpenBrace */)) {
|
|
7416
7416
|
return 1;
|
|
7417
7417
|
} else {
|
|
7418
7418
|
return 0;
|
|
@@ -7532,7 +7532,7 @@ var DefinitionInfoFinderA = class {
|
|
|
7532
7532
|
const tokenOrKeyword = getTokenOrKeywordsTouchingOffset(sourceFile.getSyntaxNode(), offset).getSingleWithHighestPriority((t) => {
|
|
7533
7533
|
if (t.isToken(9 /* Identifier */) || t.isKeyword()) {
|
|
7534
7534
|
return 2;
|
|
7535
|
-
} else if (t.isToken(
|
|
7535
|
+
} else if (t.isToken(29 /* Caret */) || t.isToken(53 /* OpenSquareBracket */) || t.isToken(32 /* CloseSquareBracket */)) {
|
|
7536
7536
|
return 1;
|
|
7537
7537
|
} else {
|
|
7538
7538
|
return 0;
|