Giter Site home page Giter Site logo

mjs-1's Introduction

mjs

Introduction

mjs is an interpreter for ECMAScript 1st edition (a.k.a. Javascript 1997) written in C++17. It was written as a hobby project for the purpose of gaining a better understanding of how Javascript actually works. As such it doesn't strive to be neither fast, secure nor particularly beautiful. In fact some things are downright terribly implemented. Also no real programs were actually tested.

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.

Building

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.

The interpreter is built in the "src" directory. It accepts a Javascript file on the command line or starts in REPL mode if no argument is given.

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

Support

Forget about it :). Feel free to raise an issue on Github, but don't expect anything to come of it.

mjs-1's People

Contributors

mras0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.