Skip to content

Commit 6fe7753

Browse files
committed
Added a test case regex with not known flags.
1 parent 1854bf9 commit 6fe7753

File tree

2 files changed

+284
-0
lines changed

2 files changed

+284
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
const regex = new RegExp(/[[abc]&&[[bcd]--[[c][d]]]]/, notKnownFlags);
Lines changed: 283 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,283 @@
1+
#10000=@"/test.js;sourcefile"
2+
files(#10000,"/test.js")
3+
#10001=@"/;folder"
4+
folders(#10001,"/")
5+
containerparent(#10001,#10000)
6+
#10002=@"loc,{#10000},0,0,0,0"
7+
locations_default(#10002,#10000,0,0,0,0)
8+
hasLocation(#10000,#10002)
9+
#20000=@"global_scope"
10+
scopes(#20000,0)
11+
#20001=@"script;{#10000},1,1"
12+
#20002=*
13+
lines(#20002,#20001,"const regex = new RegExp(/[[abc]&&[[bcd]--[[c][d]]]]/, notKnownFlags); ","
14+
")
15+
#20003=@"loc,{#10000},1,1,1,71"
16+
locations_default(#20003,#10000,1,1,1,71)
17+
hasLocation(#20002,#20003)
18+
numlines(#20001,1,1,0)
19+
#20004=*
20+
tokeninfo(#20004,7,#20001,0,"const")
21+
#20005=@"loc,{#10000},1,1,1,5"
22+
locations_default(#20005,#10000,1,1,1,5)
23+
hasLocation(#20004,#20005)
24+
#20006=*
25+
tokeninfo(#20006,6,#20001,1,"regex")
26+
#20007=@"loc,{#10000},1,7,1,11"
27+
locations_default(#20007,#10000,1,7,1,11)
28+
hasLocation(#20006,#20007)
29+
#20008=*
30+
tokeninfo(#20008,8,#20001,2,"=")
31+
#20009=@"loc,{#10000},1,13,1,13"
32+
locations_default(#20009,#10000,1,13,1,13)
33+
hasLocation(#20008,#20009)
34+
#20010=*
35+
tokeninfo(#20010,7,#20001,3,"new")
36+
#20011=@"loc,{#10000},1,15,1,17"
37+
locations_default(#20011,#10000,1,15,1,17)
38+
hasLocation(#20010,#20011)
39+
#20012=*
40+
tokeninfo(#20012,6,#20001,4,"RegExp")
41+
#20013=@"loc,{#10000},1,19,1,24"
42+
locations_default(#20013,#10000,1,19,1,24)
43+
hasLocation(#20012,#20013)
44+
#20014=*
45+
tokeninfo(#20014,8,#20001,5,"(")
46+
#20015=@"loc,{#10000},1,25,1,25"
47+
locations_default(#20015,#10000,1,25,1,25)
48+
hasLocation(#20014,#20015)
49+
#20016=*
50+
tokeninfo(#20016,5,#20001,6,"/[[abc]&&[[bcd]--[[c][d]]]]/")
51+
#20017=@"loc,{#10000},1,26,1,53"
52+
locations_default(#20017,#10000,1,26,1,53)
53+
hasLocation(#20016,#20017)
54+
#20018=*
55+
tokeninfo(#20018,8,#20001,7,",")
56+
#20019=@"loc,{#10000},1,54,1,54"
57+
locations_default(#20019,#10000,1,54,1,54)
58+
hasLocation(#20018,#20019)
59+
#20020=*
60+
tokeninfo(#20020,6,#20001,8,"notKnownFlags")
61+
#20021=@"loc,{#10000},1,56,1,68"
62+
locations_default(#20021,#10000,1,56,1,68)
63+
hasLocation(#20020,#20021)
64+
#20022=*
65+
tokeninfo(#20022,8,#20001,9,")")
66+
#20023=@"loc,{#10000},1,69,1,69"
67+
locations_default(#20023,#10000,1,69,1,69)
68+
hasLocation(#20022,#20023)
69+
#20024=*
70+
tokeninfo(#20024,8,#20001,10,";")
71+
#20025=@"loc,{#10000},1,70,1,70"
72+
locations_default(#20025,#10000,1,70,1,70)
73+
hasLocation(#20024,#20025)
74+
#20026=*
75+
tokeninfo(#20026,0,#20001,11,"")
76+
#20027=@"loc,{#10000},2,1,2,0"
77+
locations_default(#20027,#10000,2,1,2,0)
78+
hasLocation(#20026,#20027)
79+
toplevels(#20001,0)
80+
#20028=@"loc,{#10000},1,1,2,0"
81+
locations_default(#20028,#10000,1,1,2,0)
82+
hasLocation(#20001,#20028)
83+
#20029=@"var;{regex};{#20000}"
84+
variables(#20029,"regex",#20000)
85+
#20030=*
86+
stmts(#20030,22,#20001,0,"const r ... Flags);")
87+
#20031=@"loc,{#10000},1,1,1,70"
88+
locations_default(#20031,#10000,1,1,1,70)
89+
hasLocation(#20030,#20031)
90+
stmt_containers(#20030,#20001)
91+
#20032=*
92+
exprs(#20032,64,#20030,0,"regex = ... nFlags)")
93+
#20033=@"loc,{#10000},1,7,1,69"
94+
locations_default(#20033,#10000,1,7,1,69)
95+
hasLocation(#20032,#20033)
96+
enclosing_stmt(#20032,#20030)
97+
expr_containers(#20032,#20001)
98+
#20034=*
99+
exprs(#20034,78,#20032,0,"regex")
100+
hasLocation(#20034,#20007)
101+
enclosing_stmt(#20034,#20030)
102+
expr_containers(#20034,#20001)
103+
literals("regex","regex",#20034)
104+
decl(#20034,#20029)
105+
#20035=*
106+
exprs(#20035,12,#20032,1,"new Reg ... nFlags)")
107+
#20036=@"loc,{#10000},1,15,1,69"
108+
locations_default(#20036,#10000,1,15,1,69)
109+
hasLocation(#20035,#20036)
110+
enclosing_stmt(#20035,#20030)
111+
expr_containers(#20035,#20001)
112+
#20037=*
113+
exprs(#20037,79,#20035,-1,"RegExp")
114+
hasLocation(#20037,#20013)
115+
enclosing_stmt(#20037,#20030)
116+
expr_containers(#20037,#20001)
117+
literals("RegExp","RegExp",#20037)
118+
#20038=@"var;{RegExp};{#20000}"
119+
variables(#20038,"RegExp",#20000)
120+
bind(#20037,#20038)
121+
#20039=*
122+
exprs(#20039,5,#20035,0,"/[[abc] ... [d]]]]/")
123+
hasLocation(#20039,#20017)
124+
enclosing_stmt(#20039,#20030)
125+
expr_containers(#20039,#20001)
126+
literals("/[[abc]&&[[bcd]--[[c][d]]]]/","/[[abc]&&[[bcd]--[[c][d]]]]/",#20039)
127+
#20040=*
128+
regexpterm(#20040,1,#20039,0,"[[abc]&&[[bcd]--[[c][d]]]]")
129+
#20041=@"loc,{#10000},1,27,1,52"
130+
locations_default(#20041,#10000,1,27,1,52)
131+
hasLocation(#20040,#20041)
132+
#20042=*
133+
regexpterm(#20042,23,#20040,0,"[[abc]")
134+
#20043=@"loc,{#10000},1,27,1,32"
135+
locations_default(#20043,#10000,1,27,1,32)
136+
hasLocation(#20042,#20043)
137+
#20044=*
138+
regexpterm(#20044,14,#20042,0,"[")
139+
#20045=@"loc,{#10000},1,28,1,28"
140+
locations_default(#20045,#10000,1,28,1,28)
141+
hasLocation(#20044,#20045)
142+
regexp_const_value(#20044,"[")
143+
#20046=*
144+
regexpterm(#20046,14,#20042,1,"a")
145+
#20047=@"loc,{#10000},1,29,1,29"
146+
locations_default(#20047,#10000,1,29,1,29)
147+
hasLocation(#20046,#20047)
148+
regexp_const_value(#20046,"a")
149+
#20048=*
150+
regexpterm(#20048,14,#20042,2,"b")
151+
#20049=@"loc,{#10000},1,30,1,30"
152+
locations_default(#20049,#10000,1,30,1,30)
153+
hasLocation(#20048,#20049)
154+
regexp_const_value(#20048,"b")
155+
#20050=*
156+
regexpterm(#20050,14,#20042,3,"c")
157+
#20051=@"loc,{#10000},1,31,1,31"
158+
locations_default(#20051,#10000,1,31,1,31)
159+
hasLocation(#20050,#20051)
160+
regexp_const_value(#20050,"c")
161+
#20052=*
162+
regexpterm(#20052,14,#20040,1,"&&")
163+
#20053=@"loc,{#10000},1,33,1,34"
164+
locations_default(#20053,#10000,1,33,1,34)
165+
hasLocation(#20052,#20053)
166+
regexp_const_value(#20052,"&&")
167+
#20054=*
168+
regexpterm(#20054,23,#20040,2,"[[bcd]")
169+
#20055=@"loc,{#10000},1,35,1,40"
170+
locations_default(#20055,#10000,1,35,1,40)
171+
hasLocation(#20054,#20055)
172+
#20056=*
173+
regexpterm(#20056,14,#20054,0,"[")
174+
#20057=@"loc,{#10000},1,36,1,36"
175+
locations_default(#20057,#10000,1,36,1,36)
176+
hasLocation(#20056,#20057)
177+
regexp_const_value(#20056,"[")
178+
#20058=*
179+
regexpterm(#20058,14,#20054,1,"b")
180+
#20059=@"loc,{#10000},1,37,1,37"
181+
locations_default(#20059,#10000,1,37,1,37)
182+
hasLocation(#20058,#20059)
183+
regexp_const_value(#20058,"b")
184+
#20060=*
185+
regexpterm(#20060,14,#20054,2,"c")
186+
#20061=@"loc,{#10000},1,38,1,38"
187+
locations_default(#20061,#10000,1,38,1,38)
188+
hasLocation(#20060,#20061)
189+
regexp_const_value(#20060,"c")
190+
#20062=*
191+
regexpterm(#20062,14,#20054,3,"d")
192+
#20063=@"loc,{#10000},1,39,1,39"
193+
locations_default(#20063,#10000,1,39,1,39)
194+
hasLocation(#20062,#20063)
195+
regexp_const_value(#20062,"d")
196+
#20064=*
197+
regexpterm(#20064,14,#20040,3,"--")
198+
#20065=@"loc,{#10000},1,41,1,42"
199+
locations_default(#20065,#10000,1,41,1,42)
200+
hasLocation(#20064,#20065)
201+
regexp_const_value(#20064,"--")
202+
#20066=*
203+
regexpterm(#20066,23,#20040,4,"[[c]")
204+
#20067=@"loc,{#10000},1,43,1,46"
205+
locations_default(#20067,#10000,1,43,1,46)
206+
hasLocation(#20066,#20067)
207+
#20068=*
208+
regexpterm(#20068,14,#20066,0,"[")
209+
#20069=@"loc,{#10000},1,44,1,44"
210+
locations_default(#20069,#10000,1,44,1,44)
211+
hasLocation(#20068,#20069)
212+
regexp_const_value(#20068,"[")
213+
#20070=*
214+
regexpterm(#20070,14,#20066,1,"c")
215+
#20071=@"loc,{#10000},1,45,1,45"
216+
locations_default(#20071,#10000,1,45,1,45)
217+
hasLocation(#20070,#20071)
218+
regexp_const_value(#20070,"c")
219+
#20072=*
220+
regexpterm(#20072,23,#20040,5,"[d]")
221+
#20073=@"loc,{#10000},1,47,1,49"
222+
locations_default(#20073,#10000,1,47,1,49)
223+
hasLocation(#20072,#20073)
224+
#20074=*
225+
regexpterm(#20074,14,#20072,0,"d")
226+
#20075=@"loc,{#10000},1,48,1,48"
227+
locations_default(#20075,#10000,1,48,1,48)
228+
hasLocation(#20074,#20075)
229+
regexp_const_value(#20074,"d")
230+
#20076=*
231+
regexpterm(#20076,14,#20040,6,"]")
232+
#20077=@"loc,{#10000},1,50,1,50"
233+
locations_default(#20077,#10000,1,50,1,50)
234+
hasLocation(#20076,#20077)
235+
regexp_const_value(#20076,"]")
236+
#20078=*
237+
regexpterm(#20078,14,#20040,7,"]")
238+
#20079=@"loc,{#10000},1,51,1,51"
239+
locations_default(#20079,#10000,1,51,1,51)
240+
hasLocation(#20078,#20079)
241+
regexp_const_value(#20078,"]")
242+
#20080=*
243+
regexpterm(#20080,14,#20040,8,"]")
244+
#20081=@"loc,{#10000},1,52,1,52"
245+
locations_default(#20081,#10000,1,52,1,52)
246+
hasLocation(#20080,#20081)
247+
regexp_const_value(#20080,"]")
248+
#20082=*
249+
regexp_parse_errors(#20082,#20040,"unexpected character")
250+
hasLocation(#20082,#20077)
251+
#20083=*
252+
regexp_parse_errors(#20083,#20040,"unexpected character")
253+
hasLocation(#20083,#20079)
254+
#20084=*
255+
regexp_parse_errors(#20084,#20040,"unexpected character")
256+
hasLocation(#20084,#20081)
257+
#20085=*
258+
exprs(#20085,79,#20035,1,"notKnownFlags")
259+
hasLocation(#20085,#20021)
260+
enclosing_stmt(#20085,#20030)
261+
expr_containers(#20085,#20001)
262+
literals("notKnownFlags","notKnownFlags",#20085)
263+
#20086=@"var;{notKnownFlags};{#20000}"
264+
variables(#20086,"notKnownFlags",#20000)
265+
bind(#20085,#20086)
266+
#20087=*
267+
entry_cfg_node(#20087,#20001)
268+
#20088=@"loc,{#10000},1,1,1,0"
269+
locations_default(#20088,#10000,1,1,1,0)
270+
hasLocation(#20087,#20088)
271+
#20089=*
272+
exit_cfg_node(#20089,#20001)
273+
hasLocation(#20089,#20027)
274+
successor(#20030,#20034)
275+
successor(#20085,#20035)
276+
successor(#20039,#20085)
277+
successor(#20037,#20039)
278+
successor(#20035,#20032)
279+
successor(#20034,#20037)
280+
successor(#20032,#20089)
281+
successor(#20087,#20030)
282+
numlines(#10000,1,1,0)
283+
filetype(#10000,"javascript")

0 commit comments

Comments
 (0)