shapesecurity / shift-parser-js

ECMAScript parser that produces a Shift format AST
http://shift-ast.org/parser.html
Apache License 2.0
245 stars 28 forks source link

Is there anyway,we could extend this to accept class level public fields as? #430

Open ashishyog opened 4 years ago

ashishyog commented 4 years ago

Parser starts giving error "Only methods are allowed in class".

For below example:

class Rectangle { height; width; constructor(height, width) {
this.height = height; this.width = width; } }

any idea how could we support this?

michaelficarra commented 4 years ago

We will add support for these in a future release. Currently, shift-parser-js supports only the features of ES2018.