Skip to content

Commit 7f75bb9

Browse files
author
Vladimir Trunin
committed
added typings
1 parent ab5fc25 commit 7f75bb9

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

src/ISpeg.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
export interface ISpeg {
2+
parser: {
3+
parser: Function,
4+
state: {
5+
lastExpectations: [{
6+
position: number;
7+
rule: string;
8+
type: string;
9+
}];
10+
position: number;
11+
text: string;
12+
};
13+
};
14+
speg_parser: {
15+
action: string;
16+
children: [{
17+
name: string;
18+
parser: Function;
19+
}]
20+
end_position: number;
21+
match: string;
22+
start_position: number;
23+
type: string;
24+
};
25+
state: {
26+
position: number;
27+
text: string;
28+
succesfullRules?: [{
29+
end_position: number;
30+
match: string,
31+
rule: string;
32+
start_position: number;
33+
text: string;
34+
}];
35+
failedRules: [{
36+
rule: string
37+
start_position: number
38+
}];
39+
failedTags: string[];
40+
lastExpectations: [{
41+
position: number;
42+
rule: string;
43+
type: string;
44+
}];
45+
rules: [{
46+
name: string;
47+
parser: Function
48+
}];
49+
};
50+
visitor: {
51+
actions: {};
52+
};
53+
}
54+

0 commit comments

Comments
 (0)