Interface TwingParser

interface TwingParser {
    parent: null | TwingBaseNode<any, TwingBaseNodeAttributes, TwingBaseNodeChildren>;
    addImportedSymbol(type: "template", alias: string): void;
    addImportedSymbol(type: "method", alias: string, name: string, node: TwingBaseNode<any, {
        name: string;
    }, TwingBaseNodeChildren>): void;
    addTrait(trait: TwingTraitNode): void;
    embedTemplate(template: TwingTemplateNode): void;
    getBlock(name: string): null | TwingBlockNode;
    getVarName(prefix?: string): string;
    isMainScope(): boolean;
    parse(stream: TwingTokenStream, tag?: null | string, test?: null | ((token: Token) => boolean)): TwingTemplateNode;
    parseArguments(stream: TwingTokenStream, namedArguments?: boolean, definition?: boolean, allowArrow?: true): TwingArrayNode;
    parseAssignmentExpression(stream: TwingTokenStream): TwingBaseNode<null, {}, {
        [key: number]: TwingAssignmentNode;
    }>;
    parseExpression(stream: TwingTokenStream, precedence?: number, allowArrow?: true): TwingExpressionNode;
    parseFilterDefinitions(stream: TwingTokenStream): {
        arguments: TwingArrayNode;
        name: string;
    }[];
    parseFilterExpressionRaw(stream: TwingTokenStream, node: TwingBaseExpressionNode, tag?: null | string): TwingFilterNode;
    parseMultiTargetExpression(stream: TwingTokenStream): TwingBaseNode<null, TwingBaseNodeAttributes, TwingBaseNodeChildren>;
    peekBlockStack(): string;
    popBlockStack(): void;
    popLocalScope(): void;
    pushBlockStack(name: string): void;
    pushLocalScope(): void;
    setBlock(name: string, node: TwingBlockNode): void;
    setMacro(name: string, node: TwingMacroNode): void;
    subparse(stream: TwingTokenStream, tag: null | string, test: null | ((token: Token) => boolean)): TwingBaseNode<any, TwingBaseNodeAttributes, TwingBaseNodeChildren>;
}

Properties

Methods