Commit c396615
authored
Fix matching of jsClassProperty without an initial value (pangloss#1202)
Given the following code
```javascript
class Foo {
bar;
baz = 'biz';
}
```
The `baz` is properly matched as a `jsClassProperty` but `bar is
`jsClassBody`. The regex for `jsClassProperty` was requiring the `=`
that followed the property name. The changes allow value less
properties by allowing either `;` or `=` to follow the name.1 parent db59565 commit c396615
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
0 commit comments