musictheory / NilScript

Objective-C-style language superset of JavaScript with a tiny, simple runtime
Other
50 stars 5 forks source link

Coexist with Decorators #149

Open iccir opened 6 years ago

iccir commented 6 years ago

Similar to "use strict", we should have a directive that enables the use of the NilScript feature superset (and would be a superset of Strict Mode).

Certain ECMAScript features could be disabled in "NilScript Mode", for example: decorators. This allows NilScript to coexist with ECMAScript when they define syntax that we already use.

iccir commented 6 years ago

This would transpile to "use strict" for scripts and be removed for modules.

iccir commented 6 years ago

This is probably premature at this point:

  1. Decorators need to get to Stage 3 (and then 4).
  2. Esprima needs to add decorator support.