[parser] Allow optional async methods (#10582)

* Add parsePostMemberNameModifiers to aync method

* Add test
This commit is contained in:
gr
2019-11-18 15:18:36 -03:00
committed by Nicolò Ribaudo
parent cfd26fdbf2
commit 10213655bc
3 changed files with 272 additions and 0 deletions

View File

@@ -1399,6 +1399,7 @@ export default class StatementParser extends ExpressionParser {
method.kind = "method";
// The so-called parsed name would have been "async": get the real name.
this.parseClassPropertyName(method);
this.parsePostMemberNameModifiers(publicMember);
if (method.key.type === "PrivateName") {
// private async method