-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Fix start position on class declarations with decorators #628
Conversation
@@ -92,7 +92,6 @@ impl<'a, I: Tokens> Parser<'a, I> { | |||
top_level: bool, | |||
decorators: Vec<Decorator>, | |||
) -> PResult<'a, Stmt> { | |||
let start = cur_pos!(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is being passed in on line 90.
bors r+ |
Thanks! |
Build succeeded
|
Pull request successfully merged into master. |
Thanks @kdy1 and that's awesome you implemented top level await so fast! Would it be possible to get a release for swc_ecma_parser sometime you find the chance? |
@dsherret I publised it. Note that you need to update swc_common too. |
Thanks a lot @kdy1 ! I'm wondering how to get the byte position and comment vector pairs out of the let (leading_comments, trailing_comments) = comments.take_all();
// previously did something like this:
let leading_comments: HashMap<BytePos, Vec<Comment>>
= leading_comments.into_iter().collect(); |
@dsherret replace( item..value_mut(), Default::default()) |
@kdy1 awesome idea. Thanks! 🙂 |
Hmmm... couldn't figure it out then tried to just use Only slightly slower so no big deal! I'll look into this later. |
Fixes: #626 (comment)
See #581