sourcetoolchain

Toolkit for Learning Programming Using JavaScript
View on GitHub

Time-Travelling Interpreter

Evaluates Program Step-by-Step According to Substitution Model

While most interpreters and debuggers step the code statement-by-statement, Source interpreter breaks it down to the expression level. Time travelling is possible by making Source interpreter state immutable.

  • Single Step Interpreter with Time Travelling.
  • Trace Expression Evaluation.
  • Understand Recursion Using Environment Visualizer.
  • Runs in Browser and NodeJS.
  • Sandboxed Interpreter with Native JavaScript Interop.

Only Good Parts of JavaScript

Say no to Hoisting and Non Strict Equality

We eliminate JavaScript features such as non-strict equality, hoisting, variadic arguments, null values, syntax and semantics that might cause confusion for beginners.


Growing Language

Students start with a small, purely functional subset of JavaScript. As the learning progress, more features such as list data structure are introduced gradually. Eventually, imperative programming constructs such as objects and loops are added.

We added a sanitizer phase after parsing to make sure students only used allowed language features.

Friendly Syntax Analyzer

Explain common mistakes with clear error messages

Error messages should be educating, not fighting back. We tried our best to make every errors, syntax or semantic, to have a human friendly explanation and suggestion for fixing them.