domenic / count-to-6

An intro to some ES6 features via a set of self-guided workshops.
Other
326 stars 76 forks source link

Checking syntax used #10

Open domenic opened 10 years ago

domenic commented 10 years ago

This is an easy enhancement: as a prefilter, before the transpiler, verify that they're using ES6 syntax, and not cheating by using ES5.

This could be done either with quick regexes, e.g. check that spread or rest is present by searching for ..., or it could be more robust by checking the AST. We'd probably have to use the Traceur AST. I am not sure what the state of the documentation for that is.