File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -15,13 +15,18 @@ declare module 'regexp-tree/ast' {
15
15
16
16
export type AstClass = keyof AstClassMap ;
17
17
export type AstNode = AstClassMap [ AstClass ] ;
18
+ export type AstNodeLocation = {
19
+ line : number ;
20
+ column : number ;
21
+ offset : number ;
22
+ } ;
18
23
19
24
export interface Base < T extends AstClass > {
20
25
type : T ;
21
26
loc ?: {
22
27
source : string ;
23
- start : number ;
24
- end : number ;
28
+ start : AstNodeLocation ;
29
+ end : AstNodeLocation ;
25
30
} ;
26
31
}
27
32
@@ -57,8 +62,8 @@ declare module 'regexp-tree/ast' {
57
62
}
58
63
59
64
export interface Disjunction extends Base < 'Disjunction' > {
60
- left : Expression ;
61
- right : Expression ;
65
+ left : Expression | null ;
66
+ right : Expression | null ;
62
67
}
63
68
64
69
export interface CapturingGroup extends Base < 'Group' > {
@@ -156,6 +161,7 @@ declare module 'regexp-tree' {
156
161
157
162
export interface ParserOptions {
158
163
captureLocations ?: boolean ;
164
+ allowGroupNameDuplicates ?: boolean ;
159
165
}
160
166
161
167
/**
You can’t perform that action at this time.
0 commit comments