Hi. I'm brand new here so apologies if I'm asking a question with an obvious answer. I have searched here and scoured the closure-compiler source code beforehand, but it's possible I'm just using the wrong terms.
I'd like to use the compiler to yield an AST that I can then use for an IDE-focused purpose, not as much for transpiling, etc. The particular dialect that I need to be able to support allows for ES6 fields, potentially with decorators, e.g.:
class MyClass {
@decorator myField;
...
}
It doesn't appear that the closure-compiler parser allows that syntax, though, at least not given any of the compiler options I've specified. I'm hoping that I'm just missing some particular combination that does allow it.
For reference, the JavaScript scanner/parser in JetBrains IntelliJ IDEA Ultimate Edition (and WebStorm, etc.) tokenizes/parses "@decorator myField;" as (slightly simplified):
ES6FieldStatement
ES6Decorator
JsAt
JsIdentifier
ES6Field
JsIdentifier
JsSemicolon
Any insights you might have into how I might be able to configure closure-compiler parser to handle this properly--or perhaps just confirmation that it's definitely not (currently?) supported--is greatly appreciated.
Regards,
Scott