Mjs – An interpreter for ECMAScript 1st edition written in C++17
Most of ES1 should be implemented (to some degree...), but see the TODO file for details. Also be aware that you probably haven't programmed in ES1 before and will find most modern conveniences (e.g. array and object literals) missing from the specification.
You need a modern C++ compiler that supports C++17 and CMake 3.7 or later. It has currently been tested with the following compilers:
- Visual C++ 2017 15.8.8 on Windows 10
- GCC 7.1.0 (x64 distribution from Stephan T. Lavavej ) on Windows 10
- GCC 8.2.0 (on x64 Linux, Debian testing as of October 2018)
To run the tests build the "check" target.
These steps should work for most people:
mkdir build cd build cmake .. # Here you may want use e.g. CXX=g++-8 cmake .. cmake --build . cmake --build . --target check
Forget about it :). Feel free to raise an issue on Github, but don't expect anything to come of it.
- ECMAScript - A Taste from ES2019 (ES10)
- 如何让 node 运行 es6 模块文件，及其原理
- 这篇是ECMAScript 2016、2017和2018中所有新特性的示例！
- ECMAScript 2015（ES6）有用的提示与技巧
- Mjs – An interpreter for ECMAScript 1st edition written in C 17
- Implementing a Garbage Collector in C
- 重温 ES6 Symbol
- 小览 ES6-ES2019 中正则表达式的新发展