import { ConditionDeclaration, MainAgent, Monitor, ProcedureDeclaration, ProcedureParameter, Struct, VariableDeclarator } from "@pseuco/lang"; export type ClassDeclarator = Monitor | Struct; export declare class TypeEnvironment { readonly parentEnvironment: TypeEnvironment | null; protected constructor(parentEnvironment: TypeEnvironment | null); /** * Get the declaring AST nodes for variable identifiers. Does *not* work with condition variables. * @param id A variable identifier. * @returns The AST node that defines the variable or undefined if the identifier is unknown. */ getDeclarationForVariableIdentifier(id: string): VariableDeclarator | ProcedureParameter | undefined; /** * Get the declaring AST nodes for condition variable identifiers. * @param id A variable identifier. * @returns The AST node that defines the variable or undefined if the identifier is unknown. */ getDeclarationForConditionIdentifier(id: string): ConditionDeclaration | undefined; /** * Get the AST node of a procedure declaration for procedure with the provided name. * @param id A procedure name. * @returns The procedure declaration AST node that defines the procedure or undefined if the identifier is unknown. */ getDeclarationForProcedureIdentifier(id: string): ProcedureDeclaration | undefined; getDeclarationForClassIdentifier(id: string): ClassDeclarator | undefined; getDeclarationForMainAgent(): MainAgent | undefined; addVariable(id: string, declaration: VariableDeclarator | ProcedureParameter): TypeEnvironment; getAllClassDeclarators(): ClassDeclarator[]; get enclosingClassDeclarator(): Monitor | Struct | undefined; addCondition(id: string, declaration: ConditionDeclaration): TypeEnvironment; addProcedure(id: string, declaration: ProcedureDeclaration): TypeEnvironment; addClass(id: string, declaration: ClassDeclarator): TypeEnvironment; setMainAgent(declaration: MainAgent): TypeEnvironment; protected _addVariable(id: string, declaration: VariableDeclarator | ProcedureParameter, calledOn: TypeEnvironment): TypeEnvironment; protected _addCondition(id: string, declaration: ConditionDeclaration, calledOn: TypeEnvironment): TypeEnvironment; protected _addProcedure(id: string, declaration: ProcedureDeclaration, calledOn: TypeEnvironment): TypeEnvironment; protected _addClass(id: string, declaration: ClassDeclarator, calledOn: TypeEnvironment): TypeEnvironment; protected _setMainAgent(declaration: MainAgent, calledOn: TypeEnvironment): TypeEnvironment; }