/jsengine

A Javascript implementation in Scala (simple learning project)

Primary LanguageScala

This is a simple and partial implementation of JavaScript in
Scala. The background for this project is/was to thoroughly
learn JavaScript, and at the same time getting experience
writing language implementations using combinator parsers
in Scala.

This project is targetted at implementing the full ECMA 262
standard. However, the goal of this project is to learn, rather
than provide the world with yet another JavaScript runtime.
Because of this, the project will be terminated when the amount
of work outweights the learning effect.

Current incompatibilities:
 - no automatic semicolon insertion
 - semicolons are used as separators between statements, and not terminators
 - a \n ++ b will be interpreted as (a++)\n b, instead of a \n (++b)
 - labels needs to be preceeded by @label
 - comments are not supported
 - currently transforms assignments like 'a += x' into 'a = a + x'. This is
   performed before the evaluation of a, meaning that a.e. 'a[i++] += 1' is
   transformed into 'a[i++] = a[i++] + 1', which is clearly wrong. This is
   done just to get onwards with the implementation, and will be fixed once
   the actual runtime implementation is in place
 - || also evaluates its second argument, even when the first evaluates to true

This project is now terminated.