Skip to content

Commit 5f0beaf

Browse files
committed
Added test cases for nested character class.
1 parent dae1b69 commit 5f0beaf

File tree

2 files changed

+269
-0
lines changed

2 files changed

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

0 commit comments

Comments
 (0)