diff --git a/grammar.js b/grammar.js index 8a8da65a..3faa6a6e 100644 --- a/grammar.js +++ b/grammar.js @@ -101,6 +101,7 @@ module.exports = grammar({ [$.labeled_statement, $._property_name], [$.computed_property_name, $.array], [$.binary_expression, $._initializer], + [$.class_static_block, $._property_name], ], word: $ => $.identifier, @@ -1176,6 +1177,7 @@ module.exports = grammar({ class_static_block: $ => seq( 'static', + optional($._semicolon), field('body', $.statement_block), ), diff --git a/test/corpus/expressions.txt b/test/corpus/expressions.txt index d01c3573..7579da09 100644 --- a/test/corpus/expressions.txt +++ b/test/corpus/expressions.txt @@ -534,7 +534,8 @@ class Foo extends require('another-class') { super() } - static { + static + { this.#foo = 'bar'; }