quasi-literal strawman

ihab.awad at gmail.com ihab.awad at gmail.com
Wed Dec 23 10:48:29 PST 2009


On Wed, Dec 23, 2009 at 10:45 AM, Kevin Curtis
<kevinc1846 at googlemail.com> wrote:
> The strawman has been updated with an 'ast' entry:
> http://wiki.ecmascript.org/doku.php?id=strawman:ast

I did that. I needed something to point to when I said, in a separate
(as of yet unpublished) proposal, that "${that} would be a nice thing
to have".

> Is this something like the Python ast module:
> ast.parse() would parse ECMAScript source to an AST of ECMAScript
> objects. Could be pure ES.
> eval() would take an AST tree of ECMAScript objects. The
> implementation would walk the tree of ES objects to build the native
> C++ AST (which is then used to generate and execute code). This is how
> the Python ast module works.

Yes, that's what I was thinking.

> Could this revised eval(|AST of ES Objects|) be an be a
> efficient/realistic target for alt-JS's/DSL's/rewriters/LINQ? It
> should be straightforward to implement. The native C++ AST remains an
> unconstrained 'artefact of the implementation' given that ast.parse()
> is pure ES.

Yep.

Ihab

-- 
Ihab A.B. Awad, Palo Alto, CA


More information about the es-discuss mailing list