treegen: Add type definitions for parser

This commit is contained in:
Sam Vervaeck 2020-05-09 22:17:51 +02:00
parent 4f9503af4c
commit d3c5079af1

24
treegen/src/parser.d.ts vendored Normal file
View file

@ -0,0 +1,24 @@
export function parse(input:string):any;
export interface Location {
line: number;
column: number;
offset: number;
}
interface LocationRange {
start: Location,
end: Location
}
export class SyntaxError {
line: number;
column: number;
offset: number;
location: LocationRange;
expected:any[];
found:any;
name:string;
message:string;
}