import { WireFormat, Option, Expressions, ExpressionContext } from '@glimmer/interfaces'; import { BuilderStatement, BuilderComment, Path, Variable, Builder, NormalizedExpression, NormalizedParams, NormalizedHash, NormalizedAttrs, NormalizedStatement, NormalizedAngleInvocation, NormalizedBlocks } from './builder-interface'; import { AttrNamespace } from '@simple-dom/interface'; interface Symbols { top: ProgramSymbols; freeVar(name: string): number; arg(name: string): number; block(name: string): number; local(name: string): number; this(): number; hasLocal(name: string): boolean; child(params: string[]): LocalSymbols; } export declare class ProgramSymbols implements Symbols { _freeVariables: string[]; _symbols: string[]; top: this; toSymbols(): string[]; toUpvars(): string[]; freeVar(name: string): number; block(name: string): number; arg(name: string): number; local(name: string): never; this(): number; hasLocal(_name: string): false; symbol(name: string): number; child(locals: string[]): LocalSymbols; } declare class LocalSymbols implements Symbols { private parent; private locals; constructor(parent: Symbols, locals: string[]); get paramSymbols(): number[]; get top(): ProgramSymbols; freeVar(name: string): number; arg(name: string): number; block(name: string): number; local(name: string): number; this(): number; hasLocal(name: string): boolean; child(locals: string[]): LocalSymbols; } export interface BuilderGetFree { type: 'GetFree'; head: string; tail: string[]; } export declare function buildStatements(statements: BuilderStatement[], symbols: Symbols): WireFormat.Statement[]; export declare function buildNormalizedStatements(statements: NormalizedStatement[], symbols: Symbols): WireFormat.Statement[]; export declare function buildStatement(normalized: NormalizedStatement, symbols?: Symbols): WireFormat.Statement[]; export declare function s(arr: TemplateStringsArray, ...interpolated: unknown[]): [Builder.Literal, string]; export declare function c(arr: TemplateStringsArray, ...interpolated: unknown[]): BuilderComment; export declare function unicode(charCode: string): string; export declare const NEWLINE = "\n"; export declare function buildAngleInvocation({ attrs, block, head }: NormalizedAngleInvocation, symbols: Symbols): WireFormat.Statements.Component; export declare function buildAttrs(attrs: NormalizedAttrs, symbols: Symbols): { attributes: WireFormat.Attribute[]; args: WireFormat.Core.Hash; }; export declare function extractNamespace(name: string): Option; export declare function buildAttributeValue(name: string, value: NormalizedExpression, namespace: Option, symbols: Symbols): WireFormat.Attribute[]; export declare function buildExpression(expr: NormalizedExpression, context: ExpressionContext, symbols: Symbols): WireFormat.Expression; export declare function buildPath(path: Path, context: ExpressionContext, symbols: Symbols): Expressions.GetPath; export declare function buildVar(head: Variable, context: ExpressionContext, symbols: Symbols, path: string[]): Expressions.GetPath; export declare function buildVar(head: Variable, context: ExpressionContext, symbols: Symbols): Expressions.Get; export declare function expressionContextOp(context: ExpressionContext): WireFormat.SexpOpcodes.GetFreeInAppendSingleId | WireFormat.SexpOpcodes.GetFreeInExpression | WireFormat.SexpOpcodes.GetFreeInCallHead | WireFormat.SexpOpcodes.GetFreeInBlockHead | WireFormat.SexpOpcodes.GetFreeInModifierHead | WireFormat.SexpOpcodes.GetFreeInComponentHead; export declare function buildParams(exprs: Option, symbols: Symbols): Option; export declare function buildConcat(exprs: [NormalizedExpression, ...NormalizedExpression[]], symbols: Symbols): WireFormat.Core.ConcatParams; export declare function buildHash(exprs: Option, symbols: Symbols): WireFormat.Core.Hash; export declare function buildBlocks(blocks: NormalizedBlocks, blockParams: Option, parent: Symbols): WireFormat.Core.Blocks; export {}; //# sourceMappingURL=builder.d.ts.map