@@ -57,7 +57,7 @@ module.exports = function defineGrammar(dialect) {
57
57
[ $ . override_modifier , $ . primary_expression ] ,
58
58
[ $ . decorator_call_expression , $ . decorator ] ,
59
59
[ $ . literal_type , $ . pattern ] ,
60
- [ $ . predefined_type , $ . pattern ]
60
+ [ $ . predefined_type , $ . pattern ] ,
61
61
] ) ,
62
62
63
63
conflicts : ( $ , previous ) => previous . concat ( [
@@ -119,6 +119,7 @@ module.exports = function defineGrammar(dialect) {
119
119
120
120
rules : {
121
121
public_field_definition : $ => seq (
122
+ repeat ( field ( 'decorator' , $ . decorator ) ) ,
122
123
optional ( 'declare' ) ,
123
124
optional ( $ . accessibility_modifier ) ,
124
125
choice (
@@ -361,8 +362,11 @@ module.exports = function defineGrammar(dialect) {
361
362
class_body : $ => seq (
362
363
'{' ,
363
364
repeat ( choice (
364
- $ . decorator ,
365
- seq ( $ . method_definition , optional ( $ . _semicolon ) ) ,
365
+ seq (
366
+ repeat ( field ( 'decorator' , $ . decorator ) ) ,
367
+ $ . method_definition ,
368
+ optional ( $ . _semicolon )
369
+ ) ,
366
370
// As it happens for functions, the semicolon insertion should not
367
371
// happen if a block follows the closing paren, because then it's a
368
372
// *definition*, not a declaration. Example:
0 commit comments