@lcap/nasl-language-server-core 4.0.0-alpha.1 → 4.0.0-beta.10
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/out/checker.d.ts +7 -7
- package/out/checker.d.ts.map +1 -1
- package/out/checker.js +183 -163
- package/out/checker.js.map +1 -1
- package/out/index.d.ts +2 -0
- package/out/index.d.ts.map +1 -1
- package/out/index.js +2 -0
- package/out/index.js.map +1 -1
- package/out/reference-manager/builtin-q-name.d.ts.map +1 -1
- package/out/reference-manager/builtin-q-name.js +16 -10
- package/out/reference-manager/builtin-q-name.js.map +1 -1
- package/out/reference-manager/collect-q-name.d.ts +24 -7
- package/out/reference-manager/collect-q-name.d.ts.map +1 -1
- package/out/reference-manager/collect-q-name.js +223 -74
- package/out/reference-manager/collect-q-name.js.map +1 -1
- package/out/reference-manager/get-q-name.d.ts +11 -0
- package/out/reference-manager/get-q-name.d.ts.map +1 -0
- package/out/reference-manager/get-q-name.js +217 -0
- package/out/reference-manager/get-q-name.js.map +1 -0
- package/out/reference-manager/reference-manager.d.ts +127 -97
- package/out/reference-manager/reference-manager.d.ts.map +1 -1
- package/out/reference-manager/reference-manager.js +861 -968
- package/out/reference-manager/reference-manager.js.map +1 -1
- package/out/reference-manager/remove-q-name.d.ts +17 -6
- package/out/reference-manager/remove-q-name.d.ts.map +1 -1
- package/out/reference-manager/remove-q-name.js +180 -31
- package/out/reference-manager/remove-q-name.js.map +1 -1
- package/out/reference-manager/rename-q-name.d.ts +18 -6
- package/out/reference-manager/rename-q-name.d.ts.map +1 -1
- package/out/reference-manager/rename-q-name.js +134 -17
- package/out/reference-manager/rename-q-name.js.map +1 -1
- package/out/reference-manager/symbol-type.d.ts +22 -0
- package/out/reference-manager/symbol-type.d.ts.map +1 -0
- package/out/reference-manager/symbol-type.js +108 -0
- package/out/reference-manager/symbol-type.js.map +1 -0
- package/out/reference-manager/update-nasl-fragment.d.ts +53 -0
- package/out/reference-manager/update-nasl-fragment.d.ts.map +1 -0
- package/out/reference-manager/update-nasl-fragment.js +309 -0
- package/out/reference-manager/update-nasl-fragment.js.map +1 -0
- package/out/symbol/namespace.js +1 -1
- package/out/symbol/namespace.js.map +1 -1
- package/out/symbol/traverse/concepts/frontend/frontend.d.ts.map +1 -1
- package/out/symbol/traverse/concepts/frontend/frontend.js +0 -1
- package/out/symbol/traverse/concepts/frontend/frontend.js.map +1 -1
- package/out/symbol/traverse/concepts/logic/variable.d.ts.map +1 -1
- package/out/symbol/traverse/concepts/logic/variable.js +2 -1
- package/out/symbol/traverse/concepts/logic/variable.js.map +1 -1
- package/out/symbol/traverse/concepts/other/app.js +3 -3
- package/out/symbol/traverse/concepts/other/app.js.map +1 -1
- package/out/typer/collectGlobalDefs.d.ts +2 -1
- package/out/typer/collectGlobalDefs.d.ts.map +1 -1
- package/out/typer/collectGlobalDefs.js +44 -32
- package/out/typer/collectGlobalDefs.js.map +1 -1
- package/out/typer/component-def-manager/component-def-manager.d.ts +47 -10
- package/out/typer/component-def-manager/component-def-manager.d.ts.map +1 -1
- package/out/typer/component-def-manager/component-def-manager.js +135 -21
- package/out/typer/component-def-manager/component-def-manager.js.map +1 -1
- package/out/typer/component-def-manager/utils.d.ts.map +1 -1
- package/out/typer/component-def-manager/utils.js +62 -15
- package/out/typer/component-def-manager/utils.js.map +1 -1
- package/out/typer/dispatch-all.d.ts +2 -2
- package/out/typer/dispatch-all.d.ts.map +1 -1
- package/out/typer/dispatch-all.js +38 -27
- package/out/typer/dispatch-all.js.map +1 -1
- package/out/typer/dispatch-def.d.ts +8 -3
- package/out/typer/dispatch-def.d.ts.map +1 -1
- package/out/typer/dispatch-def.js +142 -50
- package/out/typer/dispatch-def.js.map +1 -1
- package/out/typer/dispatch-expr.d.ts +4 -2
- package/out/typer/dispatch-expr.d.ts.map +1 -1
- package/out/typer/dispatch-expr.js +664 -474
- package/out/typer/dispatch-expr.js.map +1 -1
- package/out/typer/dispatch-process.d.ts +2 -3
- package/out/typer/dispatch-process.d.ts.map +1 -1
- package/out/typer/dispatch-process.js +80 -63
- package/out/typer/dispatch-process.js.map +1 -1
- package/out/typer/dispatch-stmt.d.ts +1 -0
- package/out/typer/dispatch-stmt.d.ts.map +1 -1
- package/out/typer/dispatch-stmt.js +40 -57
- package/out/typer/dispatch-stmt.js.map +1 -1
- package/out/typer/dispatch-view.d.ts +6 -6
- package/out/typer/dispatch-view.d.ts.map +1 -1
- package/out/typer/dispatch-view.js +425 -221
- package/out/typer/dispatch-view.js.map +1 -1
- package/out/typer/fix-use-before-assign.js +8 -8
- package/out/typer/fix-use-before-assign.js.map +1 -1
- package/out/typer/helper.d.ts +3 -2
- package/out/typer/helper.d.ts.map +1 -1
- package/out/typer/helper.js +7 -7
- package/out/typer/helper.js.map +1 -1
- package/out/typer/incremental-update.d.ts +38 -20
- package/out/typer/incremental-update.d.ts.map +1 -1
- package/out/typer/incremental-update.js +384 -207
- package/out/typer/incremental-update.js.map +1 -1
- package/out/typer/index.d.ts +6 -4
- package/out/typer/index.d.ts.map +1 -1
- package/out/typer/index.js +49 -50
- package/out/typer/index.js.map +1 -1
- package/out/typer/nasl-predicate.d.ts +10 -0
- package/out/typer/nasl-predicate.d.ts.map +1 -0
- package/out/typer/nasl-predicate.js +22 -0
- package/out/typer/nasl-predicate.js.map +1 -0
- package/out/typer/query-manager/query-manager.d.ts +28 -0
- package/out/typer/query-manager/query-manager.d.ts.map +1 -0
- package/out/typer/query-manager/query-manager.js +64 -0
- package/out/typer/query-manager/query-manager.js.map +1 -0
- package/out/typer/query-manager/query-tokens.d.ts +4 -0
- package/out/typer/query-manager/query-tokens.d.ts.map +1 -0
- package/out/typer/query-manager/query-tokens.js +8 -0
- package/out/typer/query-manager/query-tokens.js.map +1 -0
- package/out/typer/query-manager/type-level-evaluation-of.d.ts +13 -0
- package/out/typer/query-manager/type-level-evaluation-of.d.ts.map +1 -0
- package/out/typer/query-manager/type-level-evaluation-of.js +4 -0
- package/out/typer/query-manager/type-level-evaluation-of.js.map +1 -0
- package/out/typer/sem-diag.d.ts +5 -3
- package/out/typer/sem-diag.d.ts.map +1 -1
- package/out/typer/sem-diag.js +57 -15
- package/out/typer/sem-diag.js.map +1 -1
- package/out/typer/solver.d.ts +10 -9
- package/out/typer/solver.d.ts.map +1 -1
- package/out/typer/solver.js +50 -42
- package/out/typer/solver.js.map +1 -1
- package/out/typer/subster.d.ts +11 -8
- package/out/typer/subster.d.ts.map +1 -1
- package/out/typer/subster.js +156 -209
- package/out/typer/subster.js.map +1 -1
- package/out/typer/topo-sort.d.ts +1 -1
- package/out/typer/topo-sort.d.ts.map +1 -1
- package/out/typer/topo-sort.js +20 -9
- package/out/typer/topo-sort.js.map +1 -1
- package/out/typer/type-hint-manager/type-hint-manager.d.ts +4 -1
- package/out/typer/type-hint-manager/type-hint-manager.d.ts.map +1 -1
- package/out/typer/type-hint-manager/type-hint-manager.js +12 -4
- package/out/typer/type-hint-manager/type-hint-manager.js.map +1 -1
- package/out/typer/type-manager.d.ts +152 -0
- package/out/typer/type-manager.d.ts.map +1 -0
- package/out/typer/type-manager.js +836 -0
- package/out/typer/type-manager.js.map +1 -0
- package/out/typer/type-predicate.d.ts +78 -0
- package/out/typer/type-predicate.d.ts.map +1 -0
- package/out/typer/type-predicate.js +465 -0
- package/out/typer/type-predicate.js.map +1 -0
- package/out/typer/typer.d.ts +67 -26
- package/out/typer/typer.d.ts.map +1 -1
- package/out/typer/typer.js +239 -92
- package/out/typer/typer.js.map +1 -1
- package/out/typer/unifier.d.ts +17 -7
- package/out/typer/unifier.d.ts.map +1 -1
- package/out/typer/unifier.js +157 -135
- package/out/typer/unifier.js.map +1 -1
- package/out/types/diagnostics.d.ts +10 -0
- package/out/types/diagnostics.d.ts.map +1 -0
- package/out/types/diagnostics.js +3 -0
- package/out/types/diagnostics.js.map +1 -0
- package/out/utils/error-boundary.d.ts +1 -1
- package/out/utils/error-boundary.d.ts.map +1 -1
- package/out/utils/error-boundary.js +15 -10
- package/out/utils/error-boundary.js.map +1 -1
- package/out/utils/file-node-cache.d.ts +12 -0
- package/out/utils/file-node-cache.d.ts.map +1 -0
- package/out/utils/file-node-cache.js +30 -0
- package/out/utils/file-node-cache.js.map +1 -0
- package/out/utils/fp-macros.d.ts +16 -0
- package/out/utils/fp-macros.d.ts.map +1 -0
- package/out/utils/fp-macros.js +82 -0
- package/out/utils/fp-macros.js.map +1 -0
- package/out/utils/nasl-type-manipulation.d.ts +29 -0
- package/out/utils/nasl-type-manipulation.d.ts.map +1 -0
- package/out/utils/nasl-type-manipulation.js +78 -0
- package/out/utils/nasl-type-manipulation.js.map +1 -0
- package/out/utils/oql.d.ts +3 -0
- package/out/utils/oql.d.ts.map +1 -0
- package/out/utils/oql.js +26 -0
- package/out/utils/oql.js.map +1 -0
- package/out/utils/parseTsClassType.d.ts +4 -4
- package/out/utils/parseTsClassType.d.ts.map +1 -1
- package/out/utils/parseTsClassType.js +122 -76
- package/out/utils/parseTsClassType.js.map +1 -1
- package/out/utils/reference-hack.d.ts +4 -0
- package/out/utils/reference-hack.d.ts.map +1 -0
- package/out/utils/reference-hack.js +14 -0
- package/out/utils/reference-hack.js.map +1 -0
- package/out/utils/type-operator.d.ts +29 -0
- package/out/utils/type-operator.d.ts.map +1 -0
- package/out/utils/type-operator.js +150 -0
- package/out/utils/type-operator.js.map +1 -0
- package/package.json +8 -5
- package/out/typer/typeManager.d.ts +0 -96
- package/out/typer/typeManager.d.ts.map +0 -1
- package/out/typer/typeManager.js +0 -879
- package/out/typer/typeManager.js.map +0 -1
package/out/checker.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import type { SyntaxNode, App, BaseNode } from '@lcap/nasl-concepts';
|
|
2
2
|
import { TypeAnnotation } from '@lcap/nasl-concepts';
|
|
3
|
-
import { SemEnv } from './typer';
|
|
3
|
+
import { type SemEnv } from './typer';
|
|
4
|
+
import { Diagnostic as NaslTypeDiagnostic } from '@lcap/nasl-types';
|
|
4
5
|
export declare enum Severity {
|
|
5
6
|
WARN = "warning",
|
|
6
7
|
ERROR = "error"
|
|
7
8
|
}
|
|
8
|
-
export
|
|
9
|
-
severity?: Severity;
|
|
10
|
-
message?: string;
|
|
11
|
-
}
|
|
9
|
+
export type Diagnostic = NaslTypeDiagnostic.Diagnostic<SyntaxNode>;
|
|
12
10
|
type ErrorContext = {
|
|
13
11
|
severity?: Severity;
|
|
14
12
|
[key: string]: any;
|
|
@@ -41,8 +39,9 @@ export declare function createErrorDiagnoser(context: DiagnoseContext): {
|
|
|
41
39
|
checkNode: (node: SyntaxNode | undefined) => Generator<TypeAnnotation | {
|
|
42
40
|
typeKind: string;
|
|
43
41
|
} | undefined, any, unknown>;
|
|
44
|
-
clearDiagnostics: (node
|
|
45
|
-
getDiagnostics: (node: SyntaxNode) => NodeDiagnosticsMap |
|
|
42
|
+
clearDiagnostics: (node?: SyntaxNode) => void;
|
|
43
|
+
getDiagnostics: (node: SyntaxNode) => NodeDiagnosticsMap | undefined;
|
|
44
|
+
getAllDiagnostics: () => FileDiagnosticsMap;
|
|
46
45
|
error: (node: SyntaxNode, message: string, context?: ErrorContext) => void;
|
|
47
46
|
};
|
|
48
47
|
export interface DiagnosticRecord {
|
|
@@ -56,5 +55,6 @@ export interface DiagnosticRecord {
|
|
|
56
55
|
suggestionDiagnostics: Array<Diagnostic>;
|
|
57
56
|
}
|
|
58
57
|
export declare const transformDiagnosticsToRecords: (fileNode: SyntaxNode, diagnostics: NodeDiagnosticsMap) => Array<DiagnosticRecord>;
|
|
58
|
+
export type ErrorDiagnoser = ReturnType<typeof createErrorDiagnoser>;
|
|
59
59
|
export {};
|
|
60
60
|
//# sourceMappingURL=checker.d.ts.map
|
package/out/checker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checker.d.ts","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EAU0F,GAAG,EAMvG,QAAQ,EACT,MAAM,qBAAqB,CA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