-
-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ecma v6 #274
Comments
Eventually. It's been a very popular question/request so I think it should be worth considering, even more that the current implementation looks quite complete and bug free. The new spec is about to be released in the next weeks, so why not start on it. The plan could be to add support for specific features one by one and release as they are ready. The parser and object model could be done as a whole first, the same way I did for ES5, then tackle each ES6 feature. Could even be a common effort. I also need to find a good test suite to validate the features. |
Create will see if i can get some time to make puæl requst :) |
To achieve support for this I am passing the typescript source into jint, and passing my source into that. Its actually not as slow as I anticipated, and I have es6 support (as well as typescript!) Some pseudocode
|
Thought about it but had never tried, that's awesome. We could even imagine a mode where Jint would load typescript automatically to execute Ecma2015. With just an option. Or something like:
On the first call of this option, we just need to load TypeScript from a resource file. It would be reused across the engine calls, and would not impact the current perf as this would be injected on demand. |
I have done it with a fair amount of success. The initial transpile hit is rough, but post that the code it produces is clean and performant. Could be an interesting flag, you just need to keep up with the typescript versions which is ever changing. |
Some news on ES6 side. For the past few months I have been actively working of implementing support for ES6. This is a huge work be I made some progress. The plan is this:
The new parser will probably be released as a separate package, just to ensure that one can use it by itself, to do crazy stuff with JS manipulation. Good news is that as of this morning I have a complete ES6 parser. It is not in a packageable form yet, but all the unit tests from Esprima are working. It includes syntax errors and range/location information. |
It's on github now: https://github.com/sebastienros/esprima-dotnet |
Annoucement #343 |
Create :) thanks :) |
@dested : I tried the suggested code to import typescript and use the transpiler. Anyone else using typescript like this? |
@dested could you provide some demo project? In general: I like the idea of having typescript-support in Jint. So maybe there should be something like an additional jing-typescript package E.g.
|
This was mid 2016, I was using TypeScript 1.6, I haven't tried it on later versions. The code worked something like this
|
Please follow #343 for updates, things are progressing and updates are sent there. |
Will jint support ecma version6?
The text was updated successfully, but these errors were encountered: