import { Ast } from "@syuilo/aiscript/index.js"; import { AiAlreadyDeclaredVariableError } from "../errors/AiTypeError.js"; import { TypeValue } from "./TypeValue.js"; import { Variable } from "./Variable.js"; export declare class Scope { private parent?; private types; private variables; private overridedVariables; constructor(parent?: Scope, types?: Map, variables?: Map, overridedVariables?: Map); copy(): Scope; createChild(): Scope; createNamespace(name: string): NamespaceScope; declareType(ident: Ast.Identifier, type: TypeValue): void; getType(ident: Ast.Identifier): TypeValue | null; hasType(ident: Ast.Identifier): boolean; defineVariable(ident: Ast.Identifier, variable: Variable): AiAlreadyDeclaredVariableError; overrideVariable(ident: Ast.Identifier, variable: Variable): void; getVariable(ident: Ast.Identifier): Variable | null; hasVariable(ident: Ast.Identifier): boolean; isDeclared(name: string): boolean; } export declare class NamespaceScope extends Scope { namespace: string; private _parent; private _variables; constructor(namespace: string, _parent: Scope, types?: Map, _variables?: Map); defineVariable(ident: Ast.Identifier, variable: Variable): AiAlreadyDeclaredVariableError; } export declare function createGlobalScope(): Scope;