Skip to content

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

Notifications You must be signed in to change notification settings

federico-r-figueredo/node.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages