Skip to content

r1tsuu/rust-javascript-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Javascript Execution Engine in Rust

Very simple JS Engine with basic expressions support:

  1. Binary expressions like 1+(3+5)*3*(3+10)
  2. Variables and changing variables:
let x = 10;
let b = 30 + 1;
b = b + 5;
x + b // evaluates to JSNumber { value: 46 }
  1. Strings
let x = "Hello World"
x //  evaluates to JSString  { value: "Hello World" }
  1. Block scoping
// its own scope
{
  let x = 1;
}
  1. Functions
function x(a, b) { 
  return a + b;
}

x(2, 3); // evaluates to 5
  1. Objects
let obj = {a: 3, b: "Hello World"}; // evaluates to JSObject { value: HashMap /w "a" - 3 as JSNumber and "b" - "Hello World" as JSString }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages