Skip to content

Commit

Permalink
Fix start position on class declarations with decorators (#628)
Browse files Browse the repository at this point in the history
Fixes: #626 (comment)

See #581
  • Loading branch information
dsherret committed Feb 6, 2020
1 parent 45604fa commit bf5cff1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion ecmascript/parser/src/parser/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ impl<'a, I: Tokens> Parser<'a, I> {
top_level: bool,
decorators: Vec<Decorator>,
) -> PResult<'a, Stmt> {
let start = cur_pos!();
if top_level && is!("await") {
let valid = self.target() >= JscTarget::Es2017 && self.syntax().top_level_await();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"declare": false,
"span": {
"start": 5,
"start": 0,
"end": 196,
"ctxt": 0
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"declare": false,
"span": {
"start": 21,
"start": 0,
"end": 34,
"ctxt": 0
},
Expand Down

0 comments on commit bf5cff1

Please sign in to comment.