parse parameter decorators

This commit is contained in:
Shuhei Kagawa
2016-03-24 10:01:58 +09:00
parent 6b14e4cb91
commit 29a6578658
13 changed files with 1870 additions and 0 deletions

View File

@@ -162,7 +162,14 @@ pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) {
this.expect(close);
break;
} else {
let decorators = [];
while (this.match(tt.at)) {
decorators.push(this.parseDecorator());
}
let left = this.parseMaybeDefault();
if (decorators.length) {
left.decorators = decorators;
}
this.parseAssignableListItemTypes(left);
elts.push(this.parseMaybeDefault(null, null, left));
}