DefinitelyTyped/pegjs/pegjs.d.ts
Thom Bradford d2c5200bbf Updating for the most recent version of PEG.js
the most recent version(s) of PEG.js expose location information in peg$SyntaxError that declare a start/end range
2015-11-23 20:47:34 +01:00

31 lines
559 B
TypeScript

// Type definitions for PEG.js
// Project: http://pegjs.majda.cz/
// Definitions by: vvakame <https://github.com/vvakame>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module PEG {
function parse(input:string):any;
interface Location {
line: number;
column: number;
offset: number;
}
interface LocationRange {
start: Location,
end: Location
}
class SyntaxError {
line: number;
column: number;
offset: number;
location: LocationRange;
expected:any[];
found:any;
name:string;
message:string;
}
}