diff options
author | Andy Wingo <wingo@pobox.com> | 2009-02-22 16:01:11 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-02-22 16:01:11 +0100 |
commit | e05320fa549af175c8cbb7bed8cd4ece873033da (patch) | |
tree | faaaca78867b6d3fd14ea6600f5f24b86343880c /module/language/ecmascript/parse.scm | |
parent | bb67fe27ab5cda3fcefaa1c471f75c8241cc12b2 (diff) | |
download | guile-e05320fa549af175c8cbb7bed8cd4ece873033da.tar.gz |
compile for-in
* module/language/ecmascript/base.scm (prop-keys): New method, returns
the list of keys of props of this instance.
* module/language/ecmascript/impl.scm: Refactor the global object into a
special kind of module object. Provide a prop-keys implementation for
module objects.
* module/language/ecmascript/compile-ghil.scm (comp): Compile for-in.
* module/language/ecmascript/impl.scm: Reshuffly things, and implement
make-enumerator, a helper for use in for-in statements.
* module/language/ecmascript/parse.scm (parse-ecmascript): Fix parsing of
for (var foo in bar) {}...
Diffstat (limited to 'module/language/ecmascript/parse.scm')
-rw-r--r-- | module/language/ecmascript/parse.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/language/ecmascript/parse.scm b/module/language/ecmascript/parse.scm index e96278ca2..169c992fd 100644 --- a/module/language/ecmascript/parse.scm +++ b/module/language/ecmascript/parse.scm @@ -135,7 +135,7 @@ (for lparen var VariableDeclarationListNoIn semicolon Expression semicolon Expression rparen Statement) -> `(for (var ,@$4) ,$6 ,$8 ,$10) (for lparen LeftHandSideExpression in Expression rparen Statement) -> `(for-in ,$3 ,$5 ,$7) - (for lparen var VariableDeclarationNoIn in Expression rparen Statement) -> `(for-in ,$4 ,$6 ,$8)) + (for lparen var VariableDeclarationNoIn in Expression rparen Statement) -> `(begin (var ,$4) (for-in (ref ,@$4) ,$6 ,$8))) (ContinueStatement (continue Identifier semicolon) -> `(continue ,$2) (continue semicolon) -> `(continue)) |