import { Compile } from './base-compile'; import { Attribute, IndexAttribute, Method, ReferencesAST } from '../type'; export declare class References extends Compile { /** * get variable value * @param {object} ast ast data * @param {bool} isVal for example `$foo`, isVal value should be true, other condition, * `#set($foo = $bar)`, the $bar value get, isVal set to false */ getReferences(ast: ReferencesAST, isVal?: boolean): any; /** * Get local variables used in macro and foreach loops */ getLocal(ast: ReferencesAST): { value: unknown; isLocal: boolean; }; /** * $foo.bar property evaluation, the last two parameters are used in user-passed functions * @param {object} property Property description, an object that mainly includes id, type and other definitions * @param {object} baseRef Current execution chain result, e.g. for $a.b.c, the first baseRef is $a, * the second is the return value of $a.b * @private */ getAttributes(property: Attribute, baseRef: unknown, ast: ReferencesAST): any; /** * $foo.bar[1] index evaluation * @private */ getPropIndex(property: IndexAttribute, baseRef: object): unknown; /** * $foo.bar() method evaluation */ getPropMethod(property: Method, baseRef: any, ast: ReferencesAST): any; _throw(ast: ReferencesAST, property: Attribute, errorName?: string): void; }