import { PhpStmt } from './nodes'; import { PhpFileMetadata } from './types'; import { PipelineContext } from './programBuilder'; interface ProgramUse { readonly key: string; readonly parts: readonly string[]; readonly alias: string | null; readonly type: number; readonly fullyQualified: boolean; } export interface PhpAstContext { namespaceParts: string[]; readonly docblockLines: string[]; readonly uses: Map; readonly statements: PhpStmt[]; readonly statementLines: string[]; readonly statementEntries: PhpStatementEntry[]; readonly pendingStatementLines: string[]; } export interface PhpStatementEntry { readonly node: PhpStmt; readonly lines: readonly string[]; } export interface PhpAstContextEntry { readonly key: string; readonly filePath: string; metadata: PhpFileMetadata; readonly context: PhpAstContext; } export interface PhpAstChannel { open: (options: { readonly key: string; readonly filePath: string; readonly namespace: string; readonly metadata: PhpFileMetadata; }) => PhpAstContextEntry; get: (key: string) => PhpAstContextEntry | undefined; entries: () => readonly PhpAstContextEntry[]; reset: () => void; } export declare function getPhpAstChannel(context: TContext): PhpAstChannel; export declare function resetPhpAstChannel(context: TContext): void; export declare function setNamespaceParts(context: PhpAstContext, namespace: string): void; export declare function appendDocblockLine(context: PhpAstContext, line: string): void; export declare function addUseEntry(context: PhpAstContext, use: ProgramUse): void; export declare function appendStatementLine(context: PhpAstContext, line: string): void; export declare function appendProgramStatement(context: PhpAstContext, statement: PhpStmt): void; export type { ProgramUse };