ratel-core
ratel-core copied to clipboard
[WIP] Support keyword async
Resolve issue: #109
Should pass:
// https://www.ecma-international.org/ecma-262/9.0/index.html#sec-async-function-definitions
async function foo0(){ }
// https://www.ecma-international.org/ecma-262/9.0/index.html#sec-async-generator-function-definitions
async function* foo1(){ }
// https://www.ecma-international.org/ecma-262/9.0/index.html#prod-MethodDefinition
// https://www.ecma-international.org/ecma-262/9.0/index.html#prod-AsyncMethod
class Cls {
async foo() { }
static async foo1() { }
}
// https://www.ecma-international.org/ecma-262/9.0/index.html#prod-AsyncGeneratorMethod
class Cls {
async* foo() { }
static async* foo1() { }
}
// https://www.ecma-international.org/ecma-262/9.0/index.html#sec-async-arrow-function-definitions
async a => {};
async a => a
async (a, b) => {}
async (a, b) => a