Skip to content

Latest commit

 

History

History
66 lines (51 loc) · 2.27 KB

README.md

File metadata and controls

66 lines (51 loc) · 2.27 KB

node-js-logo

The powerful JavaScript runtime, implemented from scratch in C#.

Implementation

The JavaScript engine consists on a pipeline composed by a Lexer, Parser, Resolver & Interpreter.

runtime-diagram

Implemented Features

  • Tokens & Lexing
  • Abstract Syntax Tree
  • Recursive Descent Parsing
  • Prefix & Infix Expressions
  • Runtime Representation of Objects
  • Interpreting Code using the Visitor Design Pattern
  • Lexical Scope
  • Environment Chains for Storing variables
  • Control Flow
  • Functions with Parameters
  • Closures
  • Static Variable Resolution & Error Detection
  • Classes
  • Constructors
  • Fields
  • Methods
  • Inheritance

Pending Features

  • Access Modifiers
  • ES6 Modules / Imports
  • Promises
  • Events
  • Async / Await
  • File System Native API
  • Network Native API

Usage

  • Running script file
cd ./Source/Engine/
dotnet run ./Examples/test.js

node-screenshot-1

  • REPL
cd ./Source/Engine/
dotnet run

node-screenshot-2

Examples

Feel free to peek (and run) several scripts showing off several implemented features like...

  1. Classes
  2. Recursion
  3. Closures

Caution

This runtime is not yet production ready.