mirror of
https://github.com/github/codeql.git
synced 2026-05-04 13:15:21 +02:00
JavaScript: Allow first expression in array literal to be an in expression.
This commit is contained in:
1
javascript/extractor/tests/e4x/input/regress.js
Normal file
1
javascript/extractor/tests/e4x/input/regress.js
Normal file
@@ -0,0 +1 @@
|
||||
[ x in y ]
|
||||
103
javascript/extractor/tests/e4x/output/trap/regress.js.trap
Normal file
103
javascript/extractor/tests/e4x/output/trap/regress.js.trap
Normal file
@@ -0,0 +1,103 @@
|
||||
#10000=@"/regress.js;sourcefile"
|
||||
files(#10000,"/regress.js","regress","js",0)
|
||||
#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=*
|
||||
lines(#20002,#20001,"[ x in y ]","
|
||||
")
|
||||
#20003=@"loc,{#10000},1,1,1,10"
|
||||
locations_default(#20003,#10000,1,1,1,10)
|
||||
hasLocation(#20002,#20003)
|
||||
numlines(#20001,1,1,0)
|
||||
#20004=*
|
||||
tokeninfo(#20004,8,#20001,0,"[")
|
||||
#20005=@"loc,{#10000},1,1,1,1"
|
||||
locations_default(#20005,#10000,1,1,1,1)
|
||||
hasLocation(#20004,#20005)
|
||||
#20006=*
|
||||
tokeninfo(#20006,6,#20001,1,"x")
|
||||
#20007=@"loc,{#10000},1,3,1,3"
|
||||
locations_default(#20007,#10000,1,3,1,3)
|
||||
hasLocation(#20006,#20007)
|
||||
#20008=*
|
||||
tokeninfo(#20008,7,#20001,2,"in")
|
||||
#20009=@"loc,{#10000},1,5,1,6"
|
||||
locations_default(#20009,#10000,1,5,1,6)
|
||||
hasLocation(#20008,#20009)
|
||||
#20010=*
|
||||
tokeninfo(#20010,6,#20001,3,"y")
|
||||
#20011=@"loc,{#10000},1,8,1,8"
|
||||
locations_default(#20011,#10000,1,8,1,8)
|
||||
hasLocation(#20010,#20011)
|
||||
#20012=*
|
||||
tokeninfo(#20012,8,#20001,4,"]")
|
||||
#20013=@"loc,{#10000},1,10,1,10"
|
||||
locations_default(#20013,#10000,1,10,1,10)
|
||||
hasLocation(#20012,#20013)
|
||||
#20014=*
|
||||
tokeninfo(#20014,0,#20001,5,"")
|
||||
#20015=@"loc,{#10000},2,1,2,0"
|
||||
locations_default(#20015,#10000,2,1,2,0)
|
||||
hasLocation(#20014,#20015)
|
||||
toplevels(#20001,0)
|
||||
#20016=@"loc,{#10000},1,1,2,0"
|
||||
locations_default(#20016,#10000,1,1,2,0)
|
||||
hasLocation(#20001,#20016)
|
||||
#20017=*
|
||||
stmts(#20017,2,#20001,0,"[ x in y ]")
|
||||
hasLocation(#20017,#20003)
|
||||
stmtContainers(#20017,#20001)
|
||||
#20018=*
|
||||
exprs(#20018,7,#20017,0,"[ x in y ]")
|
||||
hasLocation(#20018,#20003)
|
||||
enclosingStmt(#20018,#20017)
|
||||
exprContainers(#20018,#20001)
|
||||
#20019=*
|
||||
exprs(#20019,42,#20018,0,"x in y")
|
||||
#20020=@"loc,{#10000},1,3,1,8"
|
||||
locations_default(#20020,#10000,1,3,1,8)
|
||||
hasLocation(#20019,#20020)
|
||||
enclosingStmt(#20019,#20017)
|
||||
exprContainers(#20019,#20001)
|
||||
#20021=*
|
||||
exprs(#20021,79,#20019,0,"x")
|
||||
hasLocation(#20021,#20007)
|
||||
enclosingStmt(#20021,#20017)
|
||||
exprContainers(#20021,#20001)
|
||||
literals("x","x",#20021)
|
||||
#20022=@"var;{x};{#20000}"
|
||||
variables(#20022,"x",#20000)
|
||||
bind(#20021,#20022)
|
||||
#20023=*
|
||||
exprs(#20023,79,#20019,1,"y")
|
||||
hasLocation(#20023,#20011)
|
||||
enclosingStmt(#20023,#20017)
|
||||
exprContainers(#20023,#20001)
|
||||
literals("y","y",#20023)
|
||||
#20024=@"var;{y};{#20000}"
|
||||
variables(#20024,"y",#20000)
|
||||
bind(#20023,#20024)
|
||||
arraySize(#20018,1)
|
||||
#20025=*
|
||||
entry_cfg_node(#20025,#20001)
|
||||
#20026=@"loc,{#10000},1,1,1,0"
|
||||
locations_default(#20026,#10000,1,1,1,0)
|
||||
hasLocation(#20025,#20026)
|
||||
#20027=*
|
||||
exit_cfg_node(#20027,#20001)
|
||||
hasLocation(#20027,#20015)
|
||||
successor(#20017,#20018)
|
||||
successor(#20018,#20021)
|
||||
successor(#20023,#20019)
|
||||
successor(#20021,#20023)
|
||||
successor(#20019,#20027)
|
||||
successor(#20025,#20017)
|
||||
numlines(#10000,1,1,0)
|
||||
filetype(#10000,"javascript")
|
||||
Reference in New Issue
Block a user