+41
@@ -0,0 +1,41 @@
|
||||
/******************************************************************************
|
||||
* Copyright 2021 TypeFox GmbH
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the MIT License, which is available in the project root.
|
||||
******************************************************************************/
|
||||
import type { Scope } from '../../references/scope.js';
|
||||
import type { LangiumCoreServices } from '../../services.js';
|
||||
import type { AstNode, AstNodeDescription, ReferenceInfo } from '../../syntax-tree.js';
|
||||
import type { MultiMap } from '../../utils/collections.js';
|
||||
import type { AstNodeLocator } from '../../workspace/ast-node-locator.js';
|
||||
import type { LangiumDocument, LangiumDocuments } from '../../workspace/documents.js';
|
||||
import { DefaultScopeComputation } from '../../references/scope-computation.js';
|
||||
import { DefaultScopeProvider } from '../../references/scope-provider.js';
|
||||
export declare class LangiumGrammarScopeProvider extends DefaultScopeProvider {
|
||||
protected readonly langiumDocuments: LangiumDocuments;
|
||||
constructor(services: LangiumCoreServices);
|
||||
getScope(context: ReferenceInfo): Scope;
|
||||
private getNamedArgumentScope;
|
||||
private getTypeScope;
|
||||
protected getGlobalScope(referenceType: string, context: ReferenceInfo): Scope;
|
||||
private gatherImports;
|
||||
}
|
||||
export declare class LangiumGrammarScopeComputation extends DefaultScopeComputation {
|
||||
protected readonly astNodeLocator: AstNodeLocator;
|
||||
constructor(services: LangiumCoreServices);
|
||||
protected addExportedSymbol(node: AstNode, exports: AstNodeDescription[], document: LangiumDocument): void;
|
||||
protected addLocalSymbol(node: AstNode, document: LangiumDocument, symbols: MultiMap<AstNode, AstNodeDescription>): void;
|
||||
/**
|
||||
* Add synthetic type into the scope in case of explicitly or implicitly inferred type:<br>
|
||||
* cases: `ParserRule: ...;` or `ParserRule infers Type: ...;`
|
||||
*/
|
||||
protected processTypeNode(node: AstNode, document: LangiumDocument, symbols: MultiMap<AstNode, AstNodeDescription>): void;
|
||||
/**
|
||||
* Add synthetic type into the scope in case of explicitly inferred type:
|
||||
*
|
||||
* case: `{infer Action}`
|
||||
*/
|
||||
protected processActionNode(node: AstNode, document: LangiumDocument, symbols: MultiMap<AstNode, AstNodeDescription>): void;
|
||||
protected createInferredTypeDescription(node: AstNode, name: string, document?: LangiumDocument): AstNodeDescription;
|
||||
}
|
||||
//# sourceMappingURL=grammar-scope.d.ts.map
|
||||
Reference in New Issue
Block a user