Skip to content

Commit

Permalink
Added test cases for nested character class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Napalys committed Feb 28, 2025
1 parent de080d4 commit b60d7a3
Show file tree
Hide file tree
Showing 2 changed files with 269 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/[[]]/v; //Previously not allowed to nest character classes now completely valid with v flag.
/[[a]]/v;
/[ [] [ [] [] ] ]/v;
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
#10000=@"/regex_nested_character_class.js;sourcefile"
files(#10000,"/regex_nested_character_class.js")
#10001=@"/;folder"
folders(#10001,"/")
containerparent(#10001,#10000)
#10002=@"loc,{#10000},0,0,0,0"
locations_default(#10002,#10000,0,0,0,0)
hasLocation(#10000,#10002)
#20000=@"global_scope"
scopes(#20000,0)
#20001=@"script;{#10000},1,1"
#20002=*
comments(#20002,0,#20001,"Previously not allowed to nest character classes now completely valid with v flag.","//Previ ... v flag.")
#20003=@"loc,{#10000},1,10,1,93"
locations_default(#20003,#10000,1,10,1,93)
hasLocation(#20002,#20003)
#20004=*
lines(#20004,#20001,"/[[]]/v; //Previously not allowed to nest character classes now completely valid with v flag.","
")
#20005=@"loc,{#10000},1,1,1,93"
locations_default(#20005,#10000,1,1,1,93)
hasLocation(#20004,#20005)
#20006=*
lines(#20006,#20001,"/[[a]]/v;","
")
#20007=@"loc,{#10000},2,1,2,9"
locations_default(#20007,#10000,2,1,2,9)
hasLocation(#20006,#20007)
#20008=*
lines(#20008,#20001,"/[ [] [ [] [] ] ]/v;","
")
#20009=@"loc,{#10000},3,1,3,20"
locations_default(#20009,#10000,3,1,3,20)
hasLocation(#20008,#20009)
numlines(#20001,3,3,1)
#20010=*
tokeninfo(#20010,5,#20001,0,"/[[]]/v")
#20011=@"loc,{#10000},1,1,1,7"
locations_default(#20011,#10000,1,1,1,7)
hasLocation(#20010,#20011)
#20012=*
tokeninfo(#20012,8,#20001,1,";")
#20013=@"loc,{#10000},1,8,1,8"
locations_default(#20013,#10000,1,8,1,8)
hasLocation(#20012,#20013)
#20014=*
tokeninfo(#20014,5,#20001,2,"/[[a]]/v")
#20015=@"loc,{#10000},2,1,2,8"
locations_default(#20015,#10000,2,1,2,8)
hasLocation(#20014,#20015)
next_token(#20002,#20014)
#20016=*
tokeninfo(#20016,8,#20001,3,";")
#20017=@"loc,{#10000},2,9,2,9"
locations_default(#20017,#10000,2,9,2,9)
hasLocation(#20016,#20017)
#20018=*
tokeninfo(#20018,5,#20001,4,"/[ [] [ [] [] ] ]/v")
#20019=@"loc,{#10000},3,1,3,19"
locations_default(#20019,#10000,3,1,3,19)
hasLocation(#20018,#20019)
#20020=*
tokeninfo(#20020,8,#20001,5,";")
#20021=@"loc,{#10000},3,20,3,20"
locations_default(#20021,#10000,3,20,3,20)
hasLocation(#20020,#20021)
#20022=*
tokeninfo(#20022,0,#20001,6,"")
#20023=@"loc,{#10000},4,1,4,0"
locations_default(#20023,#10000,4,1,4,0)
hasLocation(#20022,#20023)
toplevels(#20001,0)
#20024=@"loc,{#10000},1,1,4,0"
locations_default(#20024,#10000,1,1,4,0)
hasLocation(#20001,#20024)
#20025=*
stmts(#20025,2,#20001,0,"/[[]]/v;")
#20026=@"loc,{#10000},1,1,1,8"
locations_default(#20026,#10000,1,1,1,8)
hasLocation(#20025,#20026)
stmt_containers(#20025,#20001)
#20027=*
exprs(#20027,5,#20025,0,"/[[]]/v")
hasLocation(#20027,#20011)
enclosing_stmt(#20027,#20025)
expr_containers(#20027,#20001)
literals("/[[]]/v","/[[]]/v",#20027)
#20028=*
regexpterm(#20028,1,#20027,0,"[[]]")
#20029=@"loc,{#10000},1,2,1,5"
locations_default(#20029,#10000,1,2,1,5)
hasLocation(#20028,#20029)
#20030=*
regexpterm(#20030,23,#20028,0,"[[]")
#20031=@"loc,{#10000},1,2,1,4"
locations_default(#20031,#10000,1,2,1,4)
hasLocation(#20030,#20031)
#20032=*
regexpterm(#20032,14,#20030,0,"[")
#20033=@"loc,{#10000},1,3,1,3"
locations_default(#20033,#10000,1,3,1,3)
hasLocation(#20032,#20033)
regexp_const_value(#20032,"[")
#20034=*
regexpterm(#20034,14,#20028,1,"]")
#20035=@"loc,{#10000},1,5,1,5"
locations_default(#20035,#10000,1,5,1,5)
hasLocation(#20034,#20035)
regexp_const_value(#20034,"]")
#20036=*
regexp_parse_errors(#20036,#20028,"unexpected character")
hasLocation(#20036,#20035)
#20037=*
stmts(#20037,2,#20001,1,"/[[a]]/v;")
hasLocation(#20037,#20007)
stmt_containers(#20037,#20001)
#20038=*
exprs(#20038,5,#20037,0,"/[[a]]/v")
hasLocation(#20038,#20015)
enclosing_stmt(#20038,#20037)
expr_containers(#20038,#20001)
literals("/[[a]]/v","/[[a]]/v",#20038)
#20039=*
regexpterm(#20039,1,#20038,0,"[[a]]")
#20040=@"loc,{#10000},2,2,2,6"
locations_default(#20040,#10000,2,2,2,6)
hasLocation(#20039,#20040)
#20041=*
regexpterm(#20041,23,#20039,0,"[[a]")
#20042=@"loc,{#10000},2,2,2,5"
locations_default(#20042,#10000,2,2,2,5)
hasLocation(#20041,#20042)
#20043=*
regexpterm(#20043,14,#20041,0,"[")
#20044=@"loc,{#10000},2,3,2,3"
locations_default(#20044,#10000,2,3,2,3)
hasLocation(#20043,#20044)
regexp_const_value(#20043,"[")
#20045=*
regexpterm(#20045,14,#20041,1,"a")
#20046=@"loc,{#10000},2,4,2,4"
locations_default(#20046,#10000,2,4,2,4)
hasLocation(#20045,#20046)
regexp_const_value(#20045,"a")
#20047=*
regexpterm(#20047,14,#20039,1,"]")
#20048=@"loc,{#10000},2,6,2,6"
locations_default(#20048,#10000,2,6,2,6)
hasLocation(#20047,#20048)
regexp_const_value(#20047,"]")
#20049=*
regexp_parse_errors(#20049,#20039,"unexpected character")
hasLocation(#20049,#20048)
#20050=*
stmts(#20050,2,#20001,2,"/[ [] [ [] [] ] ]/v;")
hasLocation(#20050,#20009)
stmt_containers(#20050,#20001)
#20051=*
exprs(#20051,5,#20050,0,"/[ [] [ [] [] ] ]/v")
hasLocation(#20051,#20019)
enclosing_stmt(#20051,#20050)
expr_containers(#20051,#20001)
literals("/[ [] [ [] [] ] ]/v","/[ [] [ [] [] ] ]/v",#20051)
#20052=*
regexpterm(#20052,1,#20051,0,"[ [] [ [] [] ] ]")
#20053=@"loc,{#10000},3,2,3,17"
locations_default(#20053,#10000,3,2,3,17)
hasLocation(#20052,#20053)
#20054=*
regexpterm(#20054,23,#20052,0,"[ []")
#20055=@"loc,{#10000},3,2,3,5"
locations_default(#20055,#10000,3,2,3,5)
hasLocation(#20054,#20055)
#20056=*
regexpterm(#20056,14,#20054,0," ")
#20057=@"loc,{#10000},3,3,3,3"
locations_default(#20057,#10000,3,3,3,3)
hasLocation(#20056,#20057)
regexp_const_value(#20056," ")
#20058=*
regexpterm(#20058,14,#20054,1,"[")
#20059=@"loc,{#10000},3,4,3,4"
locations_default(#20059,#10000,3,4,3,4)
hasLocation(#20058,#20059)
regexp_const_value(#20058,"[")
#20060=*
regexpterm(#20060,14,#20052,1," ")
#20061=@"loc,{#10000},3,6,3,6"
locations_default(#20061,#10000,3,6,3,6)
hasLocation(#20060,#20061)
regexp_const_value(#20060," ")
#20062=*
regexpterm(#20062,23,#20052,2,"[ []")
#20063=@"loc,{#10000},3,7,3,10"
locations_default(#20063,#10000,3,7,3,10)
hasLocation(#20062,#20063)
#20064=*
regexpterm(#20064,14,#20062,0," ")
#20065=@"loc,{#10000},3,8,3,8"
locations_default(#20065,#10000,3,8,3,8)
hasLocation(#20064,#20065)
regexp_const_value(#20064," ")
#20066=*
regexpterm(#20066,14,#20062,1,"[")
#20067=@"loc,{#10000},3,9,3,9"
locations_default(#20067,#10000,3,9,3,9)
hasLocation(#20066,#20067)
regexp_const_value(#20066,"[")
#20068=*
regexpterm(#20068,14,#20052,3," ")
#20069=@"loc,{#10000},3,11,3,11"
locations_default(#20069,#10000,3,11,3,11)
hasLocation(#20068,#20069)
regexp_const_value(#20068," ")
#20070=*
regexpterm(#20070,23,#20052,4,"[]")
#20071=@"loc,{#10000},3,12,3,13"
locations_default(#20071,#10000,3,12,3,13)
hasLocation(#20070,#20071)
#20072=*
regexpterm(#20072,14,#20052,5," ")
#20073=@"loc,{#10000},3,14,3,14"
locations_default(#20073,#10000,3,14,3,14)
hasLocation(#20072,#20073)
regexp_const_value(#20072," ")
#20074=*
regexpterm(#20074,14,#20052,6,"]")
#20075=@"loc,{#10000},3,15,3,15"
locations_default(#20075,#10000,3,15,3,15)
hasLocation(#20074,#20075)
regexp_const_value(#20074,"]")
#20076=*
regexpterm(#20076,14,#20052,7," ")
#20077=@"loc,{#10000},3,16,3,16"
locations_default(#20077,#10000,3,16,3,16)
hasLocation(#20076,#20077)
regexp_const_value(#20076," ")
#20078=*
regexpterm(#20078,14,#20052,8,"]")
#20079=@"loc,{#10000},3,17,3,17"
locations_default(#20079,#10000,3,17,3,17)
hasLocation(#20078,#20079)
regexp_const_value(#20078,"]")
#20080=*
regexp_parse_errors(#20080,#20052,"unexpected character")
hasLocation(#20080,#20075)
#20081=*
regexp_parse_errors(#20081,#20052,"unexpected character")
hasLocation(#20081,#20079)
#20082=*
entry_cfg_node(#20082,#20001)
#20083=@"loc,{#10000},1,1,1,0"
locations_default(#20083,#10000,1,1,1,0)
hasLocation(#20082,#20083)
#20084=*
exit_cfg_node(#20084,#20001)
hasLocation(#20084,#20023)
successor(#20050,#20051)
successor(#20051,#20084)
successor(#20037,#20038)
successor(#20038,#20050)
successor(#20025,#20027)
successor(#20027,#20037)
successor(#20082,#20025)
numlines(#10000,3,3,1)
filetype(#10000,"javascript")

0 comments on commit b60d7a3

Please sign in to comment.