Permalink
Browse files

progress in fixing a few bugs, and better understanding the parser. t…

…he bug was when turning a statement into a return statement
  • Loading branch information...
1 parent d3112d0 commit 92c7b25ee97257ca71a5c4745b6488861567a3e3 @maxtaco committed Nov 16, 2011
Showing with 7 additions and 13 deletions.
  1. +5 −4 src/nodes.coffee
  2. +2 −9 src/tame.coffee
View
@@ -1596,12 +1596,13 @@ exports.Await = class Await extends Base
children: ['body']
isStatement: YES
+
+ makeReturn: THIS
compileNode: (o) ->
- body = @body.compile o, LEVEL_TOP
- """(function () { /* await translation */
- #{body}
- })();"""
+ o.indent += TAB
+ body = "\n#{ @body.compile o }\n#{@tab}"
+ @tab + "(function () { /* await translation */ #{body} })();"
# We still need to walk our children to see if there are any embedded
# function which might also be tamed. But we're always going to report
View
@@ -4,12 +4,5 @@ exports.AstTamer = class AstTamer
constructor: (rest...) ->
transform: (x) ->
- x.walkTaming()
- x
-
-
-
-
-
-
-
+ x.walkTaming()
+ x

0 comments on commit 92c7b25

Please sign in to comment.