import { Parser, ParserCallback } from './parser.interface'; /** * The default Sijil parser. * * - Input : bundle value (translation) + parameters (Object or Array) * - Output : compiled translation * * Logic is contained inside mustache blocks : {{ LOGIC BLOCK }} * * There are two variants : * - A single parameter key (when the params are contained inside an object) or index (params contained inside an array) * * Examples: * * {{ key }} + { "key" : "my key" } = my key * * {{ 1 }} + [1, 2] = 2 * * - A ternary-like condition * * {{ condition ? trueValue : falseValue }} * Where condition may be : a single parameter key/index, or 2 clauses with the following operators : ==, >, =>, <=, < * * Examples: * * (the $ sign to refer to a variable is mandatory when a clause contains more than 1 word) * * {{ count > 1 ? $count cats : 1 cat }} + {"count": 10} = 10 cats * {{ 1 < count ? $count cats : 1 cat }} + {"count": 1} = 1 cat * * @export */ export declare class FragmentsParser implements Parser { constructor(); private static delimiters; private static delimRegexp; private static defaultErrorCallback; private getParameter; private compileFragment; compile(rawTranslation: string, parameters: Object, onError?: ParserCallback): string; }