@dbml/parse 5.3.0 → 5.4.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/LICENSE +0 -0
- package/dist/dbml-parse.js +10 -10
- package/dist/dbml-parse.mjs +2661 -2525
- package/dist/src/compiler/index.d.ts +66 -0
- package/dist/src/compiler/queries/container/element.d.ts +3 -0
- package/dist/src/compiler/queries/container/index.d.ts +5 -0
- package/dist/src/compiler/queries/container/scope.d.ts +3 -0
- package/dist/src/compiler/queries/container/scopeKind.d.ts +3 -0
- package/dist/src/compiler/queries/container/stack.d.ts +3 -0
- package/dist/src/compiler/queries/container/token.d.ts +9 -0
- package/dist/src/compiler/queries/parse.d.ts +11 -0
- package/dist/src/compiler/queries/symbol.d.ts +17 -0
- package/dist/src/compiler/queries/token.d.ts +4 -0
- package/dist/src/compiler/queries/transform/applyTextEdits.d.ts +13 -0
- package/dist/src/compiler/queries/transform/index.d.ts +2 -0
- package/dist/src/compiler/queries/transform/renameTable.d.ts +26 -0
- package/dist/src/compiler/types.d.ts +13 -0
- package/dist/src/constants.d.ts +1 -0
- package/dist/src/{lib → core}/analyzer/analyzer.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/binder.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/checks.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/custom.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/elementBinder.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/enum.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/indexes.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/note.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/project.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/ref.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/table.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/tableGroup.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/elementBinder/tablePartial.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/types.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/binder/utils.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/symbol/factory.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/symbol/symbolIndex.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/symbol/symbolTable.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/symbol/symbols.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/symbol/utils.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/types.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/utils.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/checks.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/custom.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/enum.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/indexes.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/note.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/project.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/ref.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/table.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/tableGroup.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/elementValidators/tablePartial.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/types.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/utils.d.ts +0 -0
- package/dist/src/{lib → core}/analyzer/validator/validator.d.ts +0 -0
- package/dist/src/{lib → core}/errors.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/elementInterpreter/enum.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/elementInterpreter/project.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/elementInterpreter/ref.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/elementInterpreter/sticky_note.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/elementInterpreter/table.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/elementInterpreter/tableGroup.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/elementInterpreter/tablePartial.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/interpreter.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/types.d.ts +0 -0
- package/dist/src/{lib → core}/interpreter/utils.d.ts +0 -0
- package/dist/src/{lib → core}/lexer/lexer.d.ts +0 -0
- package/dist/src/{lib → core}/lexer/tokens.d.ts +0 -0
- package/dist/src/{lib → core}/lexer/utils.d.ts +0 -0
- package/dist/src/{lib → core}/option.d.ts +0 -0
- package/dist/src/{lib → core}/parser/contextStack.d.ts +0 -0
- package/dist/src/{lib → core}/parser/factory.d.ts +0 -0
- package/dist/src/{lib → core}/parser/nodes.d.ts +0 -0
- package/dist/src/{lib → core}/parser/parser.d.ts +0 -0
- package/dist/src/{lib → core}/parser/utils.d.ts +0 -0
- package/dist/src/{lib → core}/report.d.ts +0 -0
- package/dist/src/{lib → core}/serialization/serialize.d.ts +0 -0
- package/dist/src/{lib → core}/types.d.ts +0 -0
- package/dist/src/{lib → core}/utils.d.ts +1 -0
- package/dist/src/index.d.ts +10 -9
- package/dist/src/services/definition/provider.d.ts +0 -0
- package/dist/src/services/index.d.ts +0 -0
- package/dist/src/services/references/provider.d.ts +0 -0
- package/dist/src/services/suggestions/provider.d.ts +0 -0
- package/dist/src/services/suggestions/utils.d.ts +2 -2
- package/dist/src/services/types.d.ts +0 -0
- package/dist/src/services/utils.d.ts +0 -0
- package/dist/tests/NaN_errors/interpreter_NaN.test.d.ts +0 -0
- package/dist/tests/binder/binder.test.d.ts +0 -0
- package/dist/tests/compiler/applyTextEdits.test.d.ts +1 -0
- package/dist/tests/compiler/renameTable.test.d.ts +1 -0
- package/dist/tests/interpreter/interpreter.test.d.ts +0 -0
- package/dist/tests/jestHelpers.d.ts +0 -0
- package/dist/tests/lexer/lexer.test.d.ts +0 -0
- package/dist/tests/parser/parser.test.d.ts +0 -0
- package/dist/tests/validator/validator.test.d.ts +0 -0
- package/package.json +2 -2
- package/dist/src/compiler.d.ts +0 -80
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ProgramNode } from '../core/parser/nodes';
|
|
2
|
+
import { SyntaxToken } from '../core/lexer/tokens';
|
|
3
|
+
import { CompileError } from '../core/errors';
|
|
4
|
+
import { Database } from '../core/interpreter/types';
|
|
5
|
+
import { default as Report } from '../core/report';
|
|
6
|
+
import { DBMLCompletionItemProvider, DBMLDefinitionProvider, DBMLReferencesProvider } from '../services/index';
|
|
7
|
+
import { TextEdit, TableNameInput } from './queries/transform';
|
|
8
|
+
export { ScopeKind } from './types';
|
|
9
|
+
export default class Compiler {
|
|
10
|
+
private source;
|
|
11
|
+
private cache;
|
|
12
|
+
private nodeIdGenerator;
|
|
13
|
+
private symbolIdGenerator;
|
|
14
|
+
setSource(source: string): void;
|
|
15
|
+
private query;
|
|
16
|
+
private interpret;
|
|
17
|
+
renameTable(oldName: TableNameInput, newName: TableNameInput): string;
|
|
18
|
+
applyTextEdits(edits: TextEdit[]): string;
|
|
19
|
+
readonly token: {
|
|
20
|
+
invalidStream: () => readonly SyntaxToken[];
|
|
21
|
+
flatStream: () => readonly SyntaxToken[];
|
|
22
|
+
};
|
|
23
|
+
readonly parse: {
|
|
24
|
+
source: () => Readonly<string>;
|
|
25
|
+
_: () => Report<{
|
|
26
|
+
ast: ProgramNode;
|
|
27
|
+
tokens: SyntaxToken[];
|
|
28
|
+
rawDb?: Database;
|
|
29
|
+
}, CompileError>;
|
|
30
|
+
ast: () => Readonly<ProgramNode>;
|
|
31
|
+
errors: () => readonly Readonly<CompileError>[];
|
|
32
|
+
tokens: () => Readonly<SyntaxToken>[];
|
|
33
|
+
rawDb: () => Readonly<Database> | undefined;
|
|
34
|
+
publicSymbolTable: () => Readonly<import('../core/analyzer/symbol/symbolTable').default>;
|
|
35
|
+
};
|
|
36
|
+
readonly container: {
|
|
37
|
+
stack: (offset: number) => readonly Readonly<import('../core/parser/nodes').SyntaxNode>[];
|
|
38
|
+
token: (offset: number) => {
|
|
39
|
+
token: SyntaxToken;
|
|
40
|
+
index: number;
|
|
41
|
+
} | {
|
|
42
|
+
token: undefined;
|
|
43
|
+
index: undefined;
|
|
44
|
+
};
|
|
45
|
+
element: (offset: number) => Readonly<ProgramNode | import('../core/parser/nodes').ElementDeclarationNode>;
|
|
46
|
+
scope: (offset: number) => Readonly<import('../core/analyzer/symbol/symbolTable').default> | undefined;
|
|
47
|
+
scopeKind: (offset: number) => import('./types').ScopeKind;
|
|
48
|
+
};
|
|
49
|
+
readonly symbol: {
|
|
50
|
+
ofName: (nameStack: string[], owner: ProgramNode | import('../core/parser/nodes').ElementDeclarationNode) => {
|
|
51
|
+
symbol: import('../core/analyzer/symbol/symbols').NodeSymbol;
|
|
52
|
+
kind: import('../core/analyzer/symbol/symbolIndex').SymbolKind;
|
|
53
|
+
name: string;
|
|
54
|
+
}[];
|
|
55
|
+
members: (ownerSymbol: import('../core/analyzer/symbol/symbols').NodeSymbol) => {
|
|
56
|
+
symbol: import('../core/analyzer/symbol/symbols').NodeSymbol;
|
|
57
|
+
name: string;
|
|
58
|
+
kind: import('../core/analyzer/symbol/symbolIndex').SymbolKind;
|
|
59
|
+
}[];
|
|
60
|
+
};
|
|
61
|
+
initMonacoServices(): {
|
|
62
|
+
definitionProvider: DBMLDefinitionProvider;
|
|
63
|
+
referenceProvider: DBMLReferencesProvider;
|
|
64
|
+
autocompletionProvider: DBMLCompletionItemProvider;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as Compiler } from '../../index';
|
|
2
|
+
import { SyntaxToken } from '../../../core/lexer/tokens';
|
|
3
|
+
export declare function containerToken(this: Compiler, offset: number): {
|
|
4
|
+
token: SyntaxToken;
|
|
5
|
+
index: number;
|
|
6
|
+
} | {
|
|
7
|
+
token: undefined;
|
|
8
|
+
index: undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as Compiler } from '../index';
|
|
2
|
+
import { ProgramNode } from '../../core/parser/nodes';
|
|
3
|
+
import { SyntaxToken } from '../../core/lexer/tokens';
|
|
4
|
+
import { CompileError } from '../../core/errors';
|
|
5
|
+
import { Database } from '../../core/interpreter/types';
|
|
6
|
+
import { default as SymbolTable } from '../../core/analyzer/symbol/symbolTable';
|
|
7
|
+
export declare function ast(this: Compiler): Readonly<ProgramNode>;
|
|
8
|
+
export declare function errors(this: Compiler): readonly Readonly<CompileError>[];
|
|
9
|
+
export declare function tokens(this: Compiler): Readonly<SyntaxToken>[];
|
|
10
|
+
export declare function rawDb(this: Compiler): Readonly<Database> | undefined;
|
|
11
|
+
export declare function publicSymbolTable(this: Compiler): Readonly<SymbolTable>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as Compiler } from '../index';
|
|
2
|
+
import { ElementDeclarationNode, ProgramNode } from '../../core/parser/nodes';
|
|
3
|
+
import { NodeSymbol } from '../../core/analyzer/symbol/symbols';
|
|
4
|
+
import { SymbolKind } from '../../core/analyzer/symbol/symbolIndex';
|
|
5
|
+
export declare function symbolMembers(this: Compiler, ownerSymbol: NodeSymbol): {
|
|
6
|
+
symbol: NodeSymbol;
|
|
7
|
+
name: string;
|
|
8
|
+
kind: SymbolKind;
|
|
9
|
+
}[];
|
|
10
|
+
export declare function symbolOfName(this: Compiler, nameStack: string[], owner: ElementDeclarationNode | ProgramNode): {
|
|
11
|
+
symbol: NodeSymbol;
|
|
12
|
+
kind: SymbolKind;
|
|
13
|
+
name: string;
|
|
14
|
+
}[];
|
|
15
|
+
export declare function symbolOfNameToKey(nameStack: string[], owner: {
|
|
16
|
+
id: number;
|
|
17
|
+
}): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface TextEdit {
|
|
2
|
+
start: number;
|
|
3
|
+
end: number;
|
|
4
|
+
newText: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Applies a sequence of text edits to a source string.
|
|
8
|
+
*
|
|
9
|
+
* @param source - The original source string
|
|
10
|
+
* @param edits - Array of text edits to apply
|
|
11
|
+
* @returns The modified source string with all edits applied
|
|
12
|
+
*/
|
|
13
|
+
export declare function applyTextEdits(source: string, edits: TextEdit[]): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as Compiler } from '../../index';
|
|
2
|
+
export type TableNameInput = string | {
|
|
3
|
+
schema?: string;
|
|
4
|
+
table: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Renames a table in the DBML source code.
|
|
8
|
+
*
|
|
9
|
+
* @param oldName - The current table name as string or object (schema defaults to 'public')
|
|
10
|
+
* @param newName - The new table name as string or object (schema defaults to 'public')
|
|
11
|
+
* @returns The updated DBML source code with the table renamed
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // String format
|
|
15
|
+
* compiler.renameTable('users', 'customers');
|
|
16
|
+
* compiler.renameTable('public.users', 'auth.customers');
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* // Object format
|
|
20
|
+
* compiler.renameTable({ table: 'users' }, { table: 'customers' });
|
|
21
|
+
* compiler.renameTable(
|
|
22
|
+
* { schema: 'auth', table: 'users' },
|
|
23
|
+
* { schema: 'auth', table: 'customers' }
|
|
24
|
+
* );
|
|
25
|
+
*/
|
|
26
|
+
export declare function renameTable(this: Compiler, oldName: TableNameInput, newName: TableNameInput): string;
|
package/dist/src/constants.d.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,6 +4,7 @@ export declare function isAlphaOrUnderscore(char: string): boolean;
|
|
|
4
4
|
export declare function isDigit(char: string): boolean;
|
|
5
5
|
export declare function isHexChar(char: string): boolean;
|
|
6
6
|
export declare function isAlphaNumeric(char: string): boolean;
|
|
7
|
+
export declare function addQuoteIfNeeded(s: string): string;
|
|
7
8
|
export declare function alternateLists<T, S>(firstList: T[], secondList: S[]): (T | S)[];
|
|
8
9
|
export declare function isOffsetWithinFullSpan(offset: number, nodeOrToken: SyntaxNode | SyntaxToken): boolean;
|
|
9
10
|
export declare function isOffsetWithinSpan(offset: number, nodeOrToken: SyntaxNode | SyntaxToken): boolean;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { serialize } from './
|
|
2
|
-
import { default as Compiler } from './compiler';
|
|
1
|
+
import { serialize } from './core/serialization/serialize';
|
|
2
|
+
import { default as Compiler } from './compiler/index';
|
|
3
3
|
import * as services from '@/services/index';
|
|
4
|
-
export { ElementKind, } from './
|
|
5
|
-
export { SyntaxNode, ElementDeclarationNode, ProgramNode, SyntaxNodeKind, type SyntaxNodeId, } from './
|
|
6
|
-
export { SyntaxToken, SyntaxTokenKind, } from './
|
|
7
|
-
export { CompileError, CompileErrorCode, } from './
|
|
8
|
-
export { type Position, } from './
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
4
|
+
export { ElementKind, } from './core/analyzer/types';
|
|
5
|
+
export { SyntaxNode, ElementDeclarationNode, ProgramNode, SyntaxNodeKind, type SyntaxNodeId, } from './core/parser/nodes';
|
|
6
|
+
export { SyntaxToken, SyntaxTokenKind, } from './core/lexer/tokens';
|
|
7
|
+
export { CompileError, CompileErrorCode, } from './core/errors';
|
|
8
|
+
export { type Position, } from './core/types';
|
|
9
|
+
export { addQuoteIfNeeded, } from './core/utils';
|
|
10
|
+
export { ScopeKind, } from './compiler/index';
|
|
11
|
+
export { type Database, type Table, type Column, type Enum, type Ref, type Project, type TableGroup, type TablePartial, } from './core/interpreter/types';
|
|
11
12
|
export { serialize, Compiler, services };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SymbolKind } from '../../
|
|
1
|
+
import { SymbolKind } from '../../core/analyzer/symbol/symbolIndex';
|
|
2
2
|
import { CompletionItemKind, CompletionList } from '../types';
|
|
3
|
-
import { SyntaxToken } from '../../
|
|
3
|
+
import { SyntaxToken } from '../../core/lexer/tokens';
|
|
4
4
|
export declare function pickCompletionItemKind(symbolKind: SymbolKind): CompletionItemKind;
|
|
5
5
|
export declare function shouldPrependSpace(token: SyntaxToken | undefined, offset: number): boolean;
|
|
6
6
|
export declare function noSuggestions(): CompletionList;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@dbml/parse",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.4.0",
|
|
5
5
|
"description": "DBML parser v2",
|
|
6
6
|
"author": "Holistics <dev@holistics.io>",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"engines": {
|
|
55
55
|
"node": ">=18"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "e7837a6418602e2b9d5a350335b669155d5c7ad4"
|
|
58
58
|
}
|
package/dist/src/compiler.d.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { SymbolKind } from './lib/analyzer/symbol/symbolIndex';
|
|
2
|
-
import { default as SymbolTable } from './lib/analyzer/symbol/symbolTable';
|
|
3
|
-
import { CompileError } from './lib/errors';
|
|
4
|
-
import { ElementDeclarationNode, ProgramNode, SyntaxNode } from './lib/parser/nodes';
|
|
5
|
-
import { NodeSymbol } from './lib/analyzer/symbol/symbols';
|
|
6
|
-
import { default as Report } from './lib/report';
|
|
7
|
-
import { SyntaxToken } from './lib/lexer/tokens';
|
|
8
|
-
import { Database } from './lib/interpreter/types';
|
|
9
|
-
import { DBMLCompletionItemProvider, DBMLDefinitionProvider, DBMLReferencesProvider } from './services/index';
|
|
10
|
-
export declare const enum ScopeKind {
|
|
11
|
-
TABLE = 0,
|
|
12
|
-
ENUM = 1,
|
|
13
|
-
TABLEGROUP = 2,
|
|
14
|
-
INDEXES = 3,
|
|
15
|
-
NOTE = 4,
|
|
16
|
-
REF = 5,
|
|
17
|
-
PROJECT = 6,
|
|
18
|
-
CUSTOM = 7,
|
|
19
|
-
TOPLEVEL = 8,
|
|
20
|
-
TABLEPARTIAL = 9,
|
|
21
|
-
CHECKS = 10
|
|
22
|
-
}
|
|
23
|
-
export default class Compiler {
|
|
24
|
-
private source;
|
|
25
|
-
private cache;
|
|
26
|
-
private nodeIdGenerator;
|
|
27
|
-
private symbolIdGenerator;
|
|
28
|
-
private createQuery;
|
|
29
|
-
setSource(source: string): void;
|
|
30
|
-
readonly token: {
|
|
31
|
-
invalidStream: () => readonly SyntaxToken[];
|
|
32
|
-
flatStream: () => readonly SyntaxToken[];
|
|
33
|
-
};
|
|
34
|
-
readonly parse: {
|
|
35
|
-
source: () => Readonly<string>;
|
|
36
|
-
_: () => Report<Readonly<{
|
|
37
|
-
ast: ProgramNode;
|
|
38
|
-
tokens: SyntaxToken[];
|
|
39
|
-
rawDb?: Database;
|
|
40
|
-
}>, CompileError>;
|
|
41
|
-
ast: () => Readonly<ProgramNode>;
|
|
42
|
-
errors: () => readonly Readonly<CompileError>[];
|
|
43
|
-
tokens: () => Readonly<SyntaxToken>[];
|
|
44
|
-
rawDb: () => Readonly<Database> | undefined;
|
|
45
|
-
publicSymbolTable: () => Readonly<SymbolTable>;
|
|
46
|
-
};
|
|
47
|
-
readonly container: {
|
|
48
|
-
stack: (arg: number) => readonly Readonly<SyntaxNode>[];
|
|
49
|
-
token: (arg: number) => {
|
|
50
|
-
token: SyntaxToken;
|
|
51
|
-
index: number;
|
|
52
|
-
} | {
|
|
53
|
-
token: undefined;
|
|
54
|
-
index: undefined;
|
|
55
|
-
};
|
|
56
|
-
element: (arg: number) => Readonly<ProgramNode | ElementDeclarationNode>;
|
|
57
|
-
scope: (arg: number) => Readonly<SymbolTable> | undefined;
|
|
58
|
-
scopeKind: (arg: number) => ScopeKind;
|
|
59
|
-
};
|
|
60
|
-
readonly symbol: {
|
|
61
|
-
ofName: (arg: {
|
|
62
|
-
nameStack: string[];
|
|
63
|
-
owner: ElementDeclarationNode | ProgramNode;
|
|
64
|
-
}) => readonly Readonly<{
|
|
65
|
-
symbol: NodeSymbol;
|
|
66
|
-
kind: SymbolKind;
|
|
67
|
-
name: string;
|
|
68
|
-
}>[];
|
|
69
|
-
members: (arg: NodeSymbol) => readonly Readonly<{
|
|
70
|
-
symbol: NodeSymbol;
|
|
71
|
-
kind: SymbolKind;
|
|
72
|
-
name: string;
|
|
73
|
-
}>[];
|
|
74
|
-
};
|
|
75
|
-
initMonacoServices(): {
|
|
76
|
-
definitionProvider: DBMLDefinitionProvider;
|
|
77
|
-
referenceProvider: DBMLReferencesProvider;
|
|
78
|
-
autocompletionProvider: DBMLCompletionItemProvider;
|
|
79
|
-
};
|
|
80
|
-
}
|