Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Allow this.state.clone() when parsing decorators #262

Merged
merged 1 commit into from
Jan 2, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/parser/statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ pp.takeDecorators = function (node) {

pp.parseDecorators = function (allowExport) {
while (this.match(tt.at)) {
this.state.decorators.push(this.parseDecorator());
let decorator = this.parseDecorator();
this.state.decorators.push(decorator);
}

if (allowExport && this.match(tt._export)) {
Expand Down