Merge pull request #1852 from xiemaisi/js/async-generator-methods

Approved by esben-semmle
This commit is contained in:
semmle-qlci 2019-09-02 16:18:04 +01:00 коммит произвёл GitHub
Родитель aa009d07fd 91e46cd6fd
Коммит c8ffbf3b87
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 769 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,7 @@
[[ condition: enterprise-only ]]
# Improvements to JavaScript analysis
## Changes to code extraction
* Asynchronous generator methods are now parsed correctly and no longer cause a spurious syntax error.

Просмотреть файл

@ -1944,6 +1944,7 @@ public class Parser {
this.parsePropertyName(pi);
if (!isPattern && this.options.ecmaVersion() >= 8 && !isGenerator && this.isAsyncProp(pi)) {
pi.isAsync = true;
pi.isGenerator = this.eat(TokenType.star);
this.parsePropertyName(pi);
} else {
pi.isAsync = false;
@ -1964,6 +1965,7 @@ public class Parser {
|| this.type == TokenType.num
|| this.type == TokenType.string
|| this.type == TokenType.bracketL
|| this.type == TokenType.star
|| this.type.keyword != null)
&& !this.canInsertSemicolon();
}
@ -3166,6 +3168,7 @@ public class Parser {
}
if (this.options.ecmaVersion() >= 8 && !isGenerator && this.isAsyncProp(pi)) {
pi.isAsync = true;
pi.isGenerator = this.eat(TokenType.star);
this.parsePropertyName(pi);
}
return parseClassPropertyBody(pi, hadConstructor, isStatic);

Просмотреть файл

@ -37,7 +37,7 @@ public class Main {
* A version identifier that should be updated every time the extractor changes in such a way that
* it may produce different tuples for the same file under the same {@link ExtractorConfig}.
*/
public static final String EXTRACTOR_VERSION = "2019-07-25";
public static final String EXTRACTOR_VERSION = "2019-09-02";
public static final Pattern NEWLINE = Pattern.compile("\n");

Просмотреть файл

@ -0,0 +1,11 @@
async function* asyncFn() {}
class C {
async *asyncMeth() {}
async *[Symbol.asyncIterator]() {}
}
var o = {
async *asyncMeth() {},
async *[Symbol.asyncIterator]() {}
}

Просмотреть файл

@ -0,0 +1,735 @@
#10000=@"/asyncIter.js;sourcefile"
files(#10000,"/asyncIter.js","asyncIter","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,"async function* asyncFn() {}","
")
#20003=@"loc,{#10000},1,1,1,28"
locations_default(#20003,#10000,1,1,1,28)
hasLocation(#20002,#20003)
#20004=*
lines(#20004,#20001,"","
")
#20005=@"loc,{#10000},2,1,2,0"
locations_default(#20005,#10000,2,1,2,0)
hasLocation(#20004,#20005)
#20006=*
lines(#20006,#20001,"class C {","
")
#20007=@"loc,{#10000},3,1,3,9"
locations_default(#20007,#10000,3,1,3,9)
hasLocation(#20006,#20007)
#20008=*
lines(#20008,#20001," async *asyncMeth() {}","
")
#20009=@"loc,{#10000},4,1,4,23"
locations_default(#20009,#10000,4,1,4,23)
hasLocation(#20008,#20009)
indentation(#10000,4," ",2)
#20010=*
lines(#20010,#20001," async *[Symbol.asyncIterator]() {}","
")
#20011=@"loc,{#10000},5,1,5,36"
locations_default(#20011,#10000,5,1,5,36)
hasLocation(#20010,#20011)
indentation(#10000,5," ",2)
#20012=*
lines(#20012,#20001,"}","
")
#20013=@"loc,{#10000},6,1,6,1"
locations_default(#20013,#10000,6,1,6,1)
hasLocation(#20012,#20013)
#20014=*
lines(#20014,#20001,"","
")
#20015=@"loc,{#10000},7,1,7,0"
locations_default(#20015,#10000,7,1,7,0)
hasLocation(#20014,#20015)
#20016=*
lines(#20016,#20001,"var o = {","
")
#20017=@"loc,{#10000},8,1,8,9"
locations_default(#20017,#10000,8,1,8,9)
hasLocation(#20016,#20017)
#20018=*
lines(#20018,#20001," async *asyncMeth() {},","
")
#20019=@"loc,{#10000},9,1,9,24"
locations_default(#20019,#10000,9,1,9,24)
hasLocation(#20018,#20019)
indentation(#10000,9," ",2)
#20020=*
lines(#20020,#20001," async *[Symbol.asyncIterator]() {}","
")
#20021=@"loc,{#10000},10,1,10,36"
locations_default(#20021,#10000,10,1,10,36)
hasLocation(#20020,#20021)
indentation(#10000,10," ",2)
#20022=*
lines(#20022,#20001,"}","
")
#20023=@"loc,{#10000},11,1,11,1"
locations_default(#20023,#10000,11,1,11,1)
hasLocation(#20022,#20023)
numlines(#20001,11,9,0)
#20024=*
tokeninfo(#20024,6,#20001,0,"async")
#20025=@"loc,{#10000},1,1,1,5"
locations_default(#20025,#10000,1,1,1,5)
hasLocation(#20024,#20025)
#20026=*
tokeninfo(#20026,7,#20001,1,"function")
#20027=@"loc,{#10000},1,7,1,14"
locations_default(#20027,#10000,1,7,1,14)
hasLocation(#20026,#20027)
#20028=*
tokeninfo(#20028,8,#20001,2,"*")
#20029=@"loc,{#10000},1,15,1,15"
locations_default(#20029,#10000,1,15,1,15)
hasLocation(#20028,#20029)
#20030=*
tokeninfo(#20030,6,#20001,3,"asyncFn")
#20031=@"loc,{#10000},1,17,1,23"
locations_default(#20031,#10000,1,17,1,23)
hasLocation(#20030,#20031)
#20032=*
tokeninfo(#20032,8,#20001,4,"(")
#20033=@"loc,{#10000},1,24,1,24"
locations_default(#20033,#10000,1,24,1,24)
hasLocation(#20032,#20033)
#20034=*
tokeninfo(#20034,8,#20001,5,")")
#20035=@"loc,{#10000},1,25,1,25"
locations_default(#20035,#10000,1,25,1,25)
hasLocation(#20034,#20035)
#20036=*
tokeninfo(#20036,8,#20001,6,"{")
#20037=@"loc,{#10000},1,27,1,27"
locations_default(#20037,#10000,1,27,1,27)
hasLocation(#20036,#20037)
#20038=*
tokeninfo(#20038,8,#20001,7,"}")
#20039=@"loc,{#10000},1,28,1,28"
locations_default(#20039,#10000,1,28,1,28)
hasLocation(#20038,#20039)
#20040=*
tokeninfo(#20040,7,#20001,8,"class")
#20041=@"loc,{#10000},3,1,3,5"
locations_default(#20041,#10000,3,1,3,5)
hasLocation(#20040,#20041)
#20042=*
tokeninfo(#20042,6,#20001,9,"C")
#20043=@"loc,{#10000},3,7,3,7"
locations_default(#20043,#10000,3,7,3,7)
hasLocation(#20042,#20043)
#20044=*
tokeninfo(#20044,8,#20001,10,"{")
#20045=@"loc,{#10000},3,9,3,9"
locations_default(#20045,#10000,3,9,3,9)
hasLocation(#20044,#20045)
#20046=*
tokeninfo(#20046,6,#20001,11,"async")
#20047=@"loc,{#10000},4,3,4,7"
locations_default(#20047,#10000,4,3,4,7)
hasLocation(#20046,#20047)
#20048=*
tokeninfo(#20048,8,#20001,12,"*")
#20049=@"loc,{#10000},4,9,4,9"
locations_default(#20049,#10000,4,9,4,9)
hasLocation(#20048,#20049)
#20050=*
tokeninfo(#20050,6,#20001,13,"asyncMeth")
#20051=@"loc,{#10000},4,10,4,18"
locations_default(#20051,#10000,4,10,4,18)
hasLocation(#20050,#20051)
#20052=*
tokeninfo(#20052,8,#20001,14,"(")
#20053=@"loc,{#10000},4,19,4,19"
locations_default(#20053,#10000,4,19,4,19)
hasLocation(#20052,#20053)
#20054=*
tokeninfo(#20054,8,#20001,15,")")
#20055=@"loc,{#10000},4,20,4,20"
locations_default(#20055,#10000,4,20,4,20)
hasLocation(#20054,#20055)
#20056=*
tokeninfo(#20056,8,#20001,16,"{")
#20057=@"loc,{#10000},4,22,4,22"
locations_default(#20057,#10000,4,22,4,22)
hasLocation(#20056,#20057)
#20058=*
tokeninfo(#20058,8,#20001,17,"}")
#20059=@"loc,{#10000},4,23,4,23"
locations_default(#20059,#10000,4,23,4,23)
hasLocation(#20058,#20059)
#20060=*
tokeninfo(#20060,6,#20001,18,"async")
#20061=@"loc,{#10000},5,3,5,7"
locations_default(#20061,#10000,5,3,5,7)
hasLocation(#20060,#20061)
#20062=*
tokeninfo(#20062,8,#20001,19,"*")
#20063=@"loc,{#10000},5,9,5,9"
locations_default(#20063,#10000,5,9,5,9)
hasLocation(#20062,#20063)
#20064=*
tokeninfo(#20064,8,#20001,20,"[")
#20065=@"loc,{#10000},5,10,5,10"
locations_default(#20065,#10000,5,10,5,10)
hasLocation(#20064,#20065)
#20066=*
tokeninfo(#20066,6,#20001,21,"Symbol")
#20067=@"loc,{#10000},5,11,5,16"
locations_default(#20067,#10000,5,11,5,16)
hasLocation(#20066,#20067)
#20068=*
tokeninfo(#20068,8,#20001,22,".")
#20069=@"loc,{#10000},5,17,5,17"
locations_default(#20069,#10000,5,17,5,17)
hasLocation(#20068,#20069)
#20070=*
tokeninfo(#20070,6,#20001,23,"asyncIterator")
#20071=@"loc,{#10000},5,18,5,30"
locations_default(#20071,#10000,5,18,5,30)
hasLocation(#20070,#20071)
#20072=*
tokeninfo(#20072,8,#20001,24,"]")
#20073=@"loc,{#10000},5,31,5,31"
locations_default(#20073,#10000,5,31,5,31)
hasLocation(#20072,#20073)
#20074=*
tokeninfo(#20074,8,#20001,25,"(")
#20075=@"loc,{#10000},5,32,5,32"
locations_default(#20075,#10000,5,32,5,32)
hasLocation(#20074,#20075)
#20076=*
tokeninfo(#20076,8,#20001,26,")")
#20077=@"loc,{#10000},5,33,5,33"
locations_default(#20077,#10000,5,33,5,33)
hasLocation(#20076,#20077)
#20078=*
tokeninfo(#20078,8,#20001,27,"{")
#20079=@"loc,{#10000},5,35,5,35"
locations_default(#20079,#10000,5,35,5,35)
hasLocation(#20078,#20079)
#20080=*
tokeninfo(#20080,8,#20001,28,"}")
#20081=@"loc,{#10000},5,36,5,36"
locations_default(#20081,#10000,5,36,5,36)
hasLocation(#20080,#20081)
#20082=*
tokeninfo(#20082,8,#20001,29,"}")
hasLocation(#20082,#20013)
#20083=*
tokeninfo(#20083,7,#20001,30,"var")
#20084=@"loc,{#10000},8,1,8,3"
locations_default(#20084,#10000,8,1,8,3)
hasLocation(#20083,#20084)
#20085=*
tokeninfo(#20085,6,#20001,31,"o")
#20086=@"loc,{#10000},8,5,8,5"
locations_default(#20086,#10000,8,5,8,5)
hasLocation(#20085,#20086)
#20087=*
tokeninfo(#20087,8,#20001,32,"=")
#20088=@"loc,{#10000},8,7,8,7"
locations_default(#20088,#10000,8,7,8,7)
hasLocation(#20087,#20088)
#20089=*
tokeninfo(#20089,8,#20001,33,"{")
#20090=@"loc,{#10000},8,9,8,9"
locations_default(#20090,#10000,8,9,8,9)
hasLocation(#20089,#20090)
#20091=*
tokeninfo(#20091,6,#20001,34,"async")
#20092=@"loc,{#10000},9,3,9,7"
locations_default(#20092,#10000,9,3,9,7)
hasLocation(#20091,#20092)
#20093=*
tokeninfo(#20093,8,#20001,35,"*")
#20094=@"loc,{#10000},9,9,9,9"
locations_default(#20094,#10000,9,9,9,9)
hasLocation(#20093,#20094)
#20095=*
tokeninfo(#20095,6,#20001,36,"asyncMeth")
#20096=@"loc,{#10000},9,10,9,18"
locations_default(#20096,#10000,9,10,9,18)
hasLocation(#20095,#20096)
#20097=*
tokeninfo(#20097,8,#20001,37,"(")
#20098=@"loc,{#10000},9,19,9,19"
locations_default(#20098,#10000,9,19,9,19)
hasLocation(#20097,#20098)
#20099=*
tokeninfo(#20099,8,#20001,38,")")
#20100=@"loc,{#10000},9,20,9,20"
locations_default(#20100,#10000,9,20,9,20)
hasLocation(#20099,#20100)
#20101=*
tokeninfo(#20101,8,#20001,39,"{")
#20102=@"loc,{#10000},9,22,9,22"
locations_default(#20102,#10000,9,22,9,22)
hasLocation(#20101,#20102)
#20103=*
tokeninfo(#20103,8,#20001,40,"}")
#20104=@"loc,{#10000},9,23,9,23"
locations_default(#20104,#10000,9,23,9,23)
hasLocation(#20103,#20104)
#20105=*
tokeninfo(#20105,8,#20001,41,",")
#20106=@"loc,{#10000},9,24,9,24"
locations_default(#20106,#10000,9,24,9,24)
hasLocation(#20105,#20106)
#20107=*
tokeninfo(#20107,6,#20001,42,"async")
#20108=@"loc,{#10000},10,3,10,7"
locations_default(#20108,#10000,10,3,10,7)
hasLocation(#20107,#20108)
#20109=*
tokeninfo(#20109,8,#20001,43,"*")
#20110=@"loc,{#10000},10,9,10,9"
locations_default(#20110,#10000,10,9,10,9)
hasLocation(#20109,#20110)
#20111=*
tokeninfo(#20111,8,#20001,44,"[")
#20112=@"loc,{#10000},10,10,10,10"
locations_default(#20112,#10000,10,10,10,10)
hasLocation(#20111,#20112)
#20113=*
tokeninfo(#20113,6,#20001,45,"Symbol")
#20114=@"loc,{#10000},10,11,10,16"
locations_default(#20114,#10000,10,11,10,16)
hasLocation(#20113,#20114)
#20115=*
tokeninfo(#20115,8,#20001,46,".")
#20116=@"loc,{#10000},10,17,10,17"
locations_default(#20116,#10000,10,17,10,17)
hasLocation(#20115,#20116)
#20117=*
tokeninfo(#20117,6,#20001,47,"asyncIterator")
#20118=@"loc,{#10000},10,18,10,30"
locations_default(#20118,#10000,10,18,10,30)
hasLocation(#20117,#20118)
#20119=*
tokeninfo(#20119,8,#20001,48,"]")
#20120=@"loc,{#10000},10,31,10,31"
locations_default(#20120,#10000,10,31,10,31)
hasLocation(#20119,#20120)
#20121=*
tokeninfo(#20121,8,#20001,49,"(")
#20122=@"loc,{#10000},10,32,10,32"
locations_default(#20122,#10000,10,32,10,32)
hasLocation(#20121,#20122)
#20123=*
tokeninfo(#20123,8,#20001,50,")")
#20124=@"loc,{#10000},10,33,10,33"
locations_default(#20124,#10000,10,33,10,33)
hasLocation(#20123,#20124)
#20125=*
tokeninfo(#20125,8,#20001,51,"{")
#20126=@"loc,{#10000},10,35,10,35"
locations_default(#20126,#10000,10,35,10,35)
hasLocation(#20125,#20126)
#20127=*
tokeninfo(#20127,8,#20001,52,"}")
#20128=@"loc,{#10000},10,36,10,36"
locations_default(#20128,#10000,10,36,10,36)
hasLocation(#20127,#20128)
#20129=*
tokeninfo(#20129,8,#20001,53,"}")
hasLocation(#20129,#20023)
#20130=*
tokeninfo(#20130,0,#20001,54,"")
#20131=@"loc,{#10000},12,1,12,0"
locations_default(#20131,#10000,12,1,12,0)
hasLocation(#20130,#20131)
toplevels(#20001,0)
#20132=@"loc,{#10000},1,1,12,0"
locations_default(#20132,#10000,1,1,12,0)
hasLocation(#20001,#20132)
#20133=@"var;{asyncFn};{#20000}"
variables(#20133,"asyncFn",#20000)
#20134=@"var;{o};{#20000}"
variables(#20134,"o",#20000)
#20135=@"var;{C};{#20000}"
variables(#20135,"C",#20000)
#20136=@"local_type_name;{C};{#20000}"
local_type_names(#20136,"C",#20000)
#20137=*
stmts(#20137,17,#20001,0,"async f ... Fn() {}")
hasLocation(#20137,#20003)
stmtContainers(#20137,#20001)
#20138=*
exprs(#20138,78,#20137,-1,"asyncFn")
hasLocation(#20138,#20031)
exprContainers(#20138,#20137)
literals("asyncFn","asyncFn",#20138)
decl(#20138,#20133)
#20139=*
scopes(#20139,1)
scopenodes(#20137,#20139)
scopenesting(#20139,#20000)
#20140=@"var;{arguments};{#20139}"
variables(#20140,"arguments",#20139)
isArgumentsObject(#20140)
isGenerator(#20137)
isAsync(#20137)
#20141=*
stmts(#20141,1,#20137,-2,"{}")
#20142=@"loc,{#10000},1,27,1,28"
locations_default(#20142,#10000,1,27,1,28)
hasLocation(#20141,#20142)
stmtContainers(#20141,#20137)
#20143=*
stmts(#20143,26,#20001,1,"class C ... () {}\n}")
#20144=@"loc,{#10000},3,1,6,1"
locations_default(#20144,#10000,3,1,6,1)
hasLocation(#20143,#20144)
stmtContainers(#20143,#20001)
#20145=*
exprs(#20145,78,#20143,0,"C")
hasLocation(#20145,#20043)
enclosingStmt(#20145,#20143)
exprContainers(#20145,#20001)
literals("C","C",#20145)
decl(#20145,#20135)
typedecl(#20145,#20136)
#20146=*
scopes(#20146,10)
scopenodes(#20143,#20146)
scopenesting(#20146,#20000)
#20147=*
properties(#20147,#20143,2,0,"async * ... th() {}")
#20148=@"loc,{#10000},4,3,4,23"
locations_default(#20148,#10000,4,3,4,23)
hasLocation(#20147,#20148)
#20149=*
exprs(#20149,0,#20147,0,"asyncMeth")
hasLocation(#20149,#20051)
enclosingStmt(#20149,#20143)
exprContainers(#20149,#20001)
literals("asyncMeth","asyncMeth",#20149)
#20150=*
exprs(#20150,9,#20147,1,"() {}")
#20151=@"loc,{#10000},4,19,4,23"
locations_default(#20151,#10000,4,19,4,23)
hasLocation(#20150,#20151)
enclosingStmt(#20150,#20143)
exprContainers(#20150,#20001)
#20152=*
scopes(#20152,1)
scopenodes(#20150,#20152)
scopenesting(#20152,#20146)
#20153=@"var;{arguments};{#20152}"
variables(#20153,"arguments",#20152)
isArgumentsObject(#20153)
isGenerator(#20150)
isAsync(#20150)
#20154=*
stmts(#20154,1,#20150,-2,"{}")
#20155=@"loc,{#10000},4,22,4,23"
locations_default(#20155,#10000,4,22,4,23)
hasLocation(#20154,#20155)
stmtContainers(#20154,#20150)
isMethod(#20147)
#20156=*
properties(#20156,#20143,3,0,"async * ... r]() {}")
#20157=@"loc,{#10000},5,3,5,36"
locations_default(#20157,#10000,5,3,5,36)
hasLocation(#20156,#20157)
#20158=*
exprs(#20158,14,#20156,0,"Symbol.asyncIterator")
#20159=@"loc,{#10000},5,11,5,30"
locations_default(#20159,#10000,5,11,5,30)
hasLocation(#20158,#20159)
enclosingStmt(#20158,#20143)
exprContainers(#20158,#20001)
#20160=*
exprs(#20160,79,#20158,0,"Symbol")
hasLocation(#20160,#20067)
enclosingStmt(#20160,#20143)
exprContainers(#20160,#20001)
literals("Symbol","Symbol",#20160)
#20161=@"var;{Symbol};{#20000}"
variables(#20161,"Symbol",#20000)
bind(#20160,#20161)
#20162=*
exprs(#20162,0,#20158,1,"asyncIterator")
hasLocation(#20162,#20071)
enclosingStmt(#20162,#20143)
exprContainers(#20162,#20001)
literals("asyncIterator","asyncIterator",#20162)
#20163=*
exprs(#20163,9,#20156,1,"() {}")
#20164=@"loc,{#10000},5,32,5,36"
locations_default(#20164,#10000,5,32,5,36)
hasLocation(#20163,#20164)
enclosingStmt(#20163,#20143)
exprContainers(#20163,#20001)
#20165=*
scopes(#20165,1)
scopenodes(#20163,#20165)
scopenesting(#20165,#20146)
#20166=@"var;{arguments};{#20165}"
variables(#20166,"arguments",#20165)
isArgumentsObject(#20166)
isGenerator(#20163)
isAsync(#20163)
#20167=*
stmts(#20167,1,#20163,-2,"{}")
#20168=@"loc,{#10000},5,35,5,36"
locations_default(#20168,#10000,5,35,5,36)
hasLocation(#20167,#20168)
stmtContainers(#20167,#20163)
isMethod(#20156)
isComputed(#20156)
#20169=*
properties(#20169,#20143,4,0,"constructor() {}")
#20170=@"loc,{#10000},3,9,3,8"
locations_default(#20170,#10000,3,9,3,8)
hasLocation(#20169,#20170)
#20171=*
exprs(#20171,0,#20169,0,"constructor")
hasLocation(#20171,#20170)
enclosingStmt(#20171,#20143)
exprContainers(#20171,#20001)
literals("constructor","constructor",#20171)
#20172=*
exprs(#20172,9,#20169,1,"() {}")
hasLocation(#20172,#20170)
enclosingStmt(#20172,#20143)
exprContainers(#20172,#20001)
#20173=*
scopes(#20173,1)
scopenodes(#20172,#20173)
scopenesting(#20173,#20146)
#20174=@"var;{arguments};{#20173}"
variables(#20174,"arguments",#20173)
isArgumentsObject(#20174)
#20175=*
stmts(#20175,1,#20172,-2,"{}")
hasLocation(#20175,#20170)
stmtContainers(#20175,#20172)
isMethod(#20169)
#20176=*
stmts(#20176,18,#20001,2,"var o = ... () {}\n}")
#20177=@"loc,{#10000},8,1,11,1"
locations_default(#20177,#10000,8,1,11,1)
hasLocation(#20176,#20177)
stmtContainers(#20176,#20001)
#20178=*
exprs(#20178,64,#20176,0,"o = {\n ... () {}\n}")
#20179=@"loc,{#10000},8,5,11,1"
locations_default(#20179,#10000,8,5,11,1)
hasLocation(#20178,#20179)
enclosingStmt(#20178,#20176)
exprContainers(#20178,#20001)
#20180=*
exprs(#20180,78,#20178,0,"o")
hasLocation(#20180,#20086)
enclosingStmt(#20180,#20176)
exprContainers(#20180,#20001)
literals("o","o",#20180)
decl(#20180,#20134)
#20181=*
exprs(#20181,8,#20178,1,"{\n asy ... () {}\n}")
#20182=@"loc,{#10000},8,9,11,1"
locations_default(#20182,#10000,8,9,11,1)
hasLocation(#20181,#20182)
enclosingStmt(#20181,#20176)
exprContainers(#20181,#20001)
#20183=*
properties(#20183,#20181,0,0,"async * ... th() {}")
#20184=@"loc,{#10000},9,3,9,23"
locations_default(#20184,#10000,9,3,9,23)
hasLocation(#20183,#20184)
#20185=*
exprs(#20185,0,#20183,0,"asyncMeth")
hasLocation(#20185,#20096)
enclosingStmt(#20185,#20176)
exprContainers(#20185,#20001)
literals("asyncMeth","asyncMeth",#20185)
#20186=*
exprs(#20186,9,#20183,1,"() {}")
#20187=@"loc,{#10000},9,19,9,23"
locations_default(#20187,#10000,9,19,9,23)
hasLocation(#20186,#20187)
enclosingStmt(#20186,#20176)
exprContainers(#20186,#20001)
#20188=*
scopes(#20188,1)
scopenodes(#20186,#20188)
scopenesting(#20188,#20000)
#20189=@"var;{arguments};{#20188}"
variables(#20189,"arguments",#20188)
isArgumentsObject(#20189)
isGenerator(#20186)
isAsync(#20186)
#20190=*
stmts(#20190,1,#20186,-2,"{}")
#20191=@"loc,{#10000},9,22,9,23"
locations_default(#20191,#10000,9,22,9,23)
hasLocation(#20190,#20191)
stmtContainers(#20190,#20186)
isMethod(#20183)
#20192=*
properties(#20192,#20181,1,0,"async * ... r]() {}")
#20193=@"loc,{#10000},10,3,10,36"
locations_default(#20193,#10000,10,3,10,36)
hasLocation(#20192,#20193)
#20194=*
exprs(#20194,14,#20192,0,"Symbol.asyncIterator")
#20195=@"loc,{#10000},10,11,10,30"
locations_default(#20195,#10000,10,11,10,30)
hasLocation(#20194,#20195)
enclosingStmt(#20194,#20176)
exprContainers(#20194,#20001)
#20196=*
exprs(#20196,79,#20194,0,"Symbol")
hasLocation(#20196,#20114)
enclosingStmt(#20196,#20176)
exprContainers(#20196,#20001)
literals("Symbol","Symbol",#20196)
bind(#20196,#20161)
#20197=*
exprs(#20197,0,#20194,1,"asyncIterator")
hasLocation(#20197,#20118)
enclosingStmt(#20197,#20176)
exprContainers(#20197,#20001)
literals("asyncIterator","asyncIterator",#20197)
#20198=*
exprs(#20198,9,#20192,1,"() {}")
#20199=@"loc,{#10000},10,32,10,36"
locations_default(#20199,#10000,10,32,10,36)
hasLocation(#20198,#20199)
enclosingStmt(#20198,#20176)
exprContainers(#20198,#20001)
#20200=*
scopes(#20200,1)
scopenodes(#20198,#20200)
scopenesting(#20200,#20000)
#20201=@"var;{arguments};{#20200}"
variables(#20201,"arguments",#20200)
isArgumentsObject(#20201)
isGenerator(#20198)
isAsync(#20198)
#20202=*
stmts(#20202,1,#20198,-2,"{}")
#20203=@"loc,{#10000},10,35,10,36"
locations_default(#20203,#10000,10,35,10,36)
hasLocation(#20202,#20203)
stmtContainers(#20202,#20198)
isComputed(#20192)
isMethod(#20192)
#20204=*
entry_cfg_node(#20204,#20001)
#20205=@"loc,{#10000},1,1,1,0"
locations_default(#20205,#10000,1,1,1,0)
hasLocation(#20204,#20205)
#20206=*
exit_cfg_node(#20206,#20001)
hasLocation(#20206,#20131)
successor(#20176,#20180)
successor(#20181,#20185)
successor(#20198,#20192)
#20207=*
entry_cfg_node(#20207,#20198)
#20208=@"loc,{#10000},10,32,10,31"
locations_default(#20208,#10000,10,32,10,31)
hasLocation(#20207,#20208)
#20209=*
exit_cfg_node(#20209,#20198)
#20210=@"loc,{#10000},10,37,10,36"
locations_default(#20210,#10000,10,37,10,36)
hasLocation(#20209,#20210)
successor(#20202,#20209)
successor(#20207,#20202)
successor(#20197,#20194)
successor(#20196,#20197)
successor(#20194,#20198)
successor(#20192,#20178)
successor(#20186,#20183)
#20211=*
entry_cfg_node(#20211,#20186)
#20212=@"loc,{#10000},9,19,9,18"
locations_default(#20212,#10000,9,19,9,18)
hasLocation(#20211,#20212)
#20213=*
exit_cfg_node(#20213,#20186)
#20214=@"loc,{#10000},9,24,9,23"
locations_default(#20214,#10000,9,24,9,23)
hasLocation(#20213,#20214)
successor(#20190,#20213)
successor(#20211,#20190)
successor(#20185,#20186)
successor(#20183,#20196)
successor(#20180,#20181)
successor(#20178,#20206)
successor(#20172,#20169)
#20215=*
entry_cfg_node(#20215,#20172)
hasLocation(#20215,#20170)
#20216=*
exit_cfg_node(#20216,#20172)
hasLocation(#20216,#20170)
successor(#20175,#20216)
successor(#20215,#20175)
successor(#20171,#20172)
successor(#20169,#20143)
successor(#20163,#20156)
#20217=*
entry_cfg_node(#20217,#20163)
#20218=@"loc,{#10000},5,32,5,31"
locations_default(#20218,#10000,5,32,5,31)
hasLocation(#20217,#20218)
#20219=*
exit_cfg_node(#20219,#20163)
#20220=@"loc,{#10000},5,37,5,36"
locations_default(#20220,#10000,5,37,5,36)
hasLocation(#20219,#20220)
successor(#20167,#20219)
successor(#20217,#20167)
successor(#20162,#20158)
successor(#20160,#20162)
successor(#20158,#20163)
successor(#20156,#20171)
successor(#20150,#20147)
#20221=*
entry_cfg_node(#20221,#20150)
#20222=@"loc,{#10000},4,19,4,18"
locations_default(#20222,#10000,4,19,4,18)
hasLocation(#20221,#20222)
#20223=*
exit_cfg_node(#20223,#20150)
#20224=@"loc,{#10000},4,24,4,23"
locations_default(#20224,#10000,4,24,4,23)
hasLocation(#20223,#20224)
successor(#20154,#20223)
successor(#20221,#20154)
successor(#20149,#20150)
successor(#20147,#20160)
successor(#20145,#20149)
successor(#20143,#20176)
successor(#20137,#20145)
#20225=*
entry_cfg_node(#20225,#20137)
hasLocation(#20225,#20205)
#20226=*
exit_cfg_node(#20226,#20137)
#20227=@"loc,{#10000},1,29,1,28"
locations_default(#20227,#10000,1,29,1,28)
hasLocation(#20226,#20227)
successor(#20141,#20226)
successor(#20225,#20141)
successor(#20138,#20137)
successor(#20204,#20138)
numlines(#10000,11,9,0)
filetype(#10000,"javascript")

Просмотреть файл

@ -57,3 +57,10 @@
| es2018.js:18:1:20:1 | async f ... / ...\\n} | 2015 | generators |
| es2018.js:18:1:20:1 | async f ... / ...\\n} | 2017 | async/await |
| es2018.js:18:1:20:1 | async f ... / ...\\n} | 2018 | asynchronous iteration |
| es2018.js:22:1:25:1 | class C ... () {}\\n} | 2015 | class |
| es2018.js:23:19:23:23 | () {} | 2015 | generators |
| es2018.js:23:19:23:23 | () {} | 2017 | async/await |
| es2018.js:23:19:23:23 | () {} | 2018 | asynchronous iteration |
| es2018.js:24:32:24:36 | () {} | 2015 | generators |
| es2018.js:24:32:24:36 | () {} | 2017 | async/await |
| es2018.js:24:32:24:36 | () {} | 2018 | asynchronous iteration |

Просмотреть файл

@ -18,3 +18,8 @@ async function foo() {
async function* readLines(path) {
// ...
}
class C {
async *asyncMeth() {}
async *[Symbol.asyncIterator]() {}
}