import { MacroCallAST, VELOCITY_AST } from '../type'; import { Compile } from './base-compile'; /** * blocks such as if, foreach, macro syntax handler */ export declare class BlockCommand extends Compile { getBlock(block: VELOCITY_AST[]): string; /** * define */ setBlockDefine(block: VELOCITY_AST[]): void; /** * define macro */ setBlockMacro(block: VELOCITY_AST[]): void; getMacroBody(asts: VELOCITY_AST[]): any; /** * parse macro call */ getMacro(ast: MacroCallAST, bodyContent?: string): any; /** * eval * @param str {array|string} input string * @param local {object} local variable * @param contextId {=string} optional contextId, this contextId use to find local variable * @return {string} */ eval(str: string | VELOCITY_AST[], local: object, contextId?: string): string; /** * Evaluate double-quoted strings, replace variables within them, only supporting the most basic variable type replacement */ evalStr(str: string): string; /** * parse #foreach */ getBlockEach(block: VELOCITY_AST[]): string; /** * parse #if */ getBlockIf(block: VELOCITY_AST[]): string; }