34
edits
(more on host-JS feature requirements) |
(updated module names) |
||
| Line 10: | Line 10: | ||
Narcissus is divided into four "modules" (using the [http://yuiblog.com/blog/2007/06/12/module-pattern/ module pattern]): | Narcissus is divided into four "modules" (using the [http://yuiblog.com/blog/2007/06/12/module-pattern/ module pattern]): | ||
* | * <code>Narcissus.definitions</code> (jsdefs.js): basic definitions shared by the other modules | ||
* | * <code>Narcissus.lexer</code> (jslex.js): lexer | ||
* | * <code>Narcissus.parser</code> (jsparse.js): parser | ||
* | * <code>Narcissus.interpreter</code> (jsexec.js): interpreter | ||
The | The <code>Narcissus.interpreter</code> module is optional; that is, it's possible to load just the first three files to obtain a JavaScript parser written in portable JavaScript. | ||
== Host language versions == | == Host language versions == | ||
These are the host language versions required by each module: | These are the host language versions required by each module/source file: | ||
* | * jsdefs.js: ES3 + <code>const</code> + <code>Object.defineProperty</code> | ||
* | * jslex.js: ES3 + <code>const</code> + <code>Object.defineProperty</code> | ||
* | * jsparse.js: ES3 + <code>const</code> + <code>Object.defineProperty</code> | ||
* | * jsexec.js: SpiderMonkey JS 1.9: | ||
** <code>const</code> (Harmony) | ** <code>const</code> (Harmony) | ||
** <code>catch</code> guards (replaceable with <code>catch</code> + <code>if</code>) | ** <code>catch</code> guards (replaceable with <code>catch</code> + <code>if</code>) | ||
| Line 35: | Line 35: | ||
** <code>__proto__ = null</code> (replaceable with [http://wiki.ecmascript.org/doku.php?id=strawman:simple_maps_and_sets Harmony maps]) | ** <code>__proto__ = null</code> (replaceable with [http://wiki.ecmascript.org/doku.php?id=strawman:simple_maps_and_sets Harmony maps]) | ||
The first three modules are web-portable. Only | The first three modules are web-portable. Only jsexec.js depends on SpiderMonkey extensions. | ||
== User language versions == | == User language versions == | ||
edits