Skip to content

[WIP] Support keyword async#129

Open
LuoZijun wants to merge 1 commit into
ratel-rust:masterfrom
LuoZijun:patch-6
Open

[WIP] Support keyword async#129
LuoZijun wants to merge 1 commit into
ratel-rust:masterfrom
LuoZijun:patch-6

Conversation

@LuoZijun

@LuoZijun LuoZijun commented Feb 26, 2019

Copy link
Copy Markdown
Contributor

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

@maciejhirsz maciejhirsz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but the println seems off :)

edit: nvm, didn't notice the [WIP] somehow.

Comment thread ratel/src/parser/mod.rs
},
_ => self.error()
_ => {
println!("eeeee:.....", );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debugging? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants