treegen: Add type definitions for parser
This commit is contained in:
parent
4f9503af4c
commit
d3c5079af1
1 changed files with 24 additions and 0 deletions
24
treegen/src/parser.d.ts
vendored
Normal file
24
treegen/src/parser.d.ts
vendored
Normal 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;
|
||||
}
|
||||
|
Loading…
Reference in a new issue