import { Settings } from "./Settings"; import { ArrayExpression, AssignExpression, BinaryExpression, CallExpression, Expression, FuncExpression, GroupExpression, IndexerExpression, LiteralExpression, MemberExpression, ObjectExpression, TernaryExpression, UnaryExpression, VariableExpression } from "./shared"; export declare function tokenize(exp: string, settings?: Settings): T; export declare class Tokenizer { protected readonly exp: string; protected readonly settings: Settings; static literalExp(value: any): LiteralExpression; static variableExp(name: string): VariableExpression; static unaryExp(operator: string, target: Expression): UnaryExpression; static groupExp(expressions: Expression[]): GroupExpression; static assignExp(member: string, right: Expression): AssignExpression; static objectExp(members: AssignExpression[]): ObjectExpression; static arrayExp(items: Expression[]): ArrayExpression; static binaryExp(operator: string, left: Expression, right: Expression): BinaryExpression; static memberExp(owner: Expression, name: string): MemberExpression; static indexerExp(owner: Expression, key: Expression): IndexerExpression; static funcExp(parameters: string[], body: Expression): FuncExpression; static callExp(callee: Expression, args: Expression[]): CallExpression; static ternaryExp(predicate: Expression, whenTrue: Expression, whenFalse: Expression): TernaryExpression; protected separator: string; protected readonly len: number; private _idx; protected get idx(): number; private _cd; protected get cd(): number; private _ch; protected get ch(): string; constructor(exp: string, settings?: Settings); process(): Expression; protected getExp(): Expression; protected tryLiteral(): Expression; protected getVariableName(): string; protected tryVariable(): VariableExpression; protected tryUnary(): UnaryExpression; /** * A unary operator binds to the next primary expression plus its postfix * chain (members, indexers, calls) — NOT to the whole remaining expression. * Parsing via getExp made "-total < -300" come back as -(total < -300); * binary and ternary continuation belongs to the caller's loop. */ protected getUnaryTarget(): Expression; protected tryGroup(): GroupExpression; protected getGroup(): Expression[]; protected tryObject(): ObjectExpression; protected tryArray(): ArrayExpression; protected tryKnown(e: Expression): LiteralExpression; protected tryMember(e: Expression): MemberExpression; protected tryIndexer(e: Expression): IndexerExpression; protected tryFunc(e: Expression): FuncExpression; protected getParameters(e: Expression): string[]; protected tryCall(e: Expression): CallExpression; protected getCall(e: Expression): CallExpression; protected tryTernary(e: Expression): TernaryExpression; protected tryBinary(e: Expression): BinaryExpression; protected isSpace(): boolean; protected isNumber(): boolean; protected isVariableStart(): boolean; protected stillVariable(): boolean; protected move(count?: number): string; protected get(s: string): boolean; protected skip(): void; protected eq(idx: number, target: string): boolean; protected to(c: string): void; protected fixPrecedence(left: Expression, leftOp: string, right: BinaryExpression): BinaryExpression; }