UNPKG

@composita/symbols

Version:

Composita language symbols.

72 lines 4.68 kB
import { TypeSymbol, ComponentSymbol, InterfaceSymbol, BuiltInTypeSymbol, MessageSymbol, ProcedureSymbol, ConstantSymbol } from './type-symbols'; import { GlobalScopeSymbol, ScopeSymbolType, NamedScopeSymbol, ImplementationSymbol } from './scope-symbols'; import { GenericSymbol } from './generic-symbols'; import { VariableSymbol, CollectionVariableSymbol } from './variable-symbols'; import { ExpressionNode, TypeNode, DesignatorNode, ImplementationNode, DeclarationNode, ProcedureCallNode, FunctionCallNode, ReceiveNode, SendNode, VariableNode, ConstantNode, ComponentNode, InterfaceNode, MessagePattern } from '@composita/ast'; import { Optional } from '@composita/ts-utility-types'; export declare class SearchOptions { readonly scope: ScopeSymbolType; readonly searchGlobalScope: boolean; readonly searchParentScope: boolean; constructor(scope: ScopeSymbolType, searchGlobalScope: boolean, searchParentScope: boolean); } export declare class SymbolTable { readonly globalScope: GlobalScopeSymbol; readonly voidType: BuiltInTypeSymbol; readonly anyRequiredInterfaceType: InterfaceSymbol; readonly anyGenericComponentType: GenericSymbol; readonly anyComponentType: ComponentSymbol; readonly anyMessage: MessageSymbol; readonly finishMessage: MessageSymbol; readonly symbolToDeclaration: Map<NamedScopeSymbol, DeclarationNode>; readonly symbolToImplementation: Map<ImplementationSymbol, ImplementationNode>; readonly symbolToComponent: Map<ComponentSymbol, ComponentNode>; readonly symbolToInterface: Map<InterfaceSymbol, InterfaceNode>; readonly expressionToSymbol: Map<ExpressionNode, TypeSymbol>; readonly typeToSymbol: Map<TypeNode, TypeSymbol>; readonly designatorToSymbol: Map<DesignatorNode, NamedScopeSymbol>; readonly variableToSymbol: Map<ConstantNode | VariableNode, VariableSymbol>; readonly callToSymbol: Map<FunctionCallNode | ProcedureCallNode, ProcedureSymbol>; readonly sendReceiveToSymbol: Map<SendNode | ReceiveNode, MessageSymbol>; readonly patternToSymbol: Map<MessagePattern, MessageSymbol>; readonly types: TypeSymbol[]; readonly builtins: BuiltInTypeSymbol[]; readonly components: ComponentSymbol[]; readonly interfaces: InterfaceSymbol[]; readonly messages: MessageSymbol[]; readonly constants: ConstantSymbol[]; readonly procedures: ProcedureSymbol[]; readonly impplementations: ImplementationSymbol[]; readonly variables: VariableSymbol[]; readonly collectionVariables: CollectionVariableSymbol[]; getMessages(scope: ScopeSymbolType): Array<MessageSymbol>; getSystemProcedures(): Array<ProcedureSymbol>; getProcedures(scope: ScopeSymbolType): Array<ProcedureSymbol>; getImplementations(scope: ComponentSymbol): Array<ImplementationSymbol>; getVariables(scope: ScopeSymbolType): Array<VariableSymbol>; getCollectionVariables(scope: ScopeSymbolType): Array<CollectionVariableSymbol>; registerBuiltIns(builtin: BuiltInTypeSymbol): void; registerComponent(component: ComponentSymbol): void; registerInterface(interfaceSymbol: InterfaceSymbol): void; registerMessage(message: MessageSymbol): void; registerProcedure(procedure: ProcedureSymbol): void; registerImplementation(implementation: ImplementationSymbol): void; registerVariable(variable: VariableSymbol): void; registerCollectionVariable(variable: CollectionVariableSymbol): void; getOrThrow<T>(item: Optional<T>): T; getFirstOrThrow<T>(data: Array<T>): T; static componentSatisfiesGeneric(component: ComponentSymbol, generic: GenericSymbol): boolean; findBuiltIn(name: string): Array<BuiltInTypeSymbol>; findProcedure(identifier: string, params: Array<TypeSymbol>, returnType: Optional<TypeSymbol>, options: SearchOptions): Array<ProcedureSymbol>; private isAssignable; private findInComponent; private findNameInScope; findVariable(identifier: string, options: SearchOptions): Array<VariableSymbol>; findMessage(identifier: string, ignoreParams: boolean, params: Array<TypeSymbol>, options: SearchOptions): Array<MessageSymbol>; findCollectionVariable(identifier: string, ignoreParams: boolean, params: Array<TypeSymbol>, options: SearchOptions): Array<CollectionVariableSymbol>; findComponent(identifier: string, options: SearchOptions): Array<ComponentSymbol>; findInterface(identifier: string, options: SearchOptions): Array<InterfaceSymbol>; findType(identifier: string, options: SearchOptions): Array<TypeSymbol>; findImplementation(identifier: string, options: SearchOptions): Array<ImplementationSymbol>; } //# sourceMappingURL=symboltable.d.ts.map