UNPKG

survey-core

Version:

survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.

55 lines (54 loc) 1.46 kB
export interface IFilePosition { offset: number; line: number; column: number; } export interface IFileRange { start: IFilePosition; end: IFilePosition; } export interface ILiteralExpectation { type: "literal"; text: string; ignoreCase: boolean; } export interface IClassParts extends Array<string | IClassParts> { } export interface IClassExpectation { type: "class"; parts: IClassParts; inverted: boolean; ignoreCase: boolean; } export interface IAnyExpectation { type: "any"; } export interface IEndExpectation { type: "end"; } export interface IOtherExpectation { type: "other"; description: string; } export type Expectation = ILiteralExpectation | IClassExpectation | IAnyExpectation | IEndExpectation | IOtherExpectation; export declare class SyntaxError extends Error { static buildMessage(expected: Expectation[], found: string | null): string; message: string; expected: Expectation[]; found: string | null; location: IFileRange; name: string; constructor(message: string, expected: Expectation[], found: string | null, location: IFileRange); } export interface ICached { nextPos: number; result: any; } export interface IParseOptions { filename?: string; startRule?: string; tracer?: any; [key: string]: any; } export type ParseFunction = (input: string, options?: IParseOptions) => any; export declare const parse: ParseFunction;