import * as ts from "typescript"; import * as lua from "../../LuaAST"; import { TransformationContext } from "../context"; export declare enum ScopeType { File = 1, Function = 2, Switch = 4, Loop = 8, Conditional = 16, Block = 32, Try = 64, Catch = 128 } interface FunctionDefinitionInfo { referencedSymbols: Map; definition?: lua.VariableDeclarationStatement | lua.AssignmentStatement; } export interface Scope { type: ScopeType; id: number; referencedSymbols?: Map; variableDeclarations?: lua.VariableDeclarationStatement[]; functionDefinitions?: Map; importStatements?: lua.Statement[]; loopContinued?: boolean; functionReturned?: boolean; } export declare function walkScopesUp(context: TransformationContext): IterableIterator; export declare function markSymbolAsReferencedInCurrentScopes(context: TransformationContext, symbolId: lua.SymbolId, identifier: ts.Identifier): void; export declare function peekScope(context: TransformationContext): Scope; export declare function findScope(context: TransformationContext, scopeTypes: ScopeType): Scope | undefined; export declare function pushScope(context: TransformationContext, scopeType: ScopeType): Scope; export declare function popScope(context: TransformationContext): Scope; export declare function performHoisting(context: TransformationContext, statements: lua.Statement[]): lua.Statement[]; export {};