Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 92c7b25ee97257ca71a5c4745b6488861567a3e3 1 parent d3112d0
@maxtaco authored
Showing with 7 additions and 13 deletions.
  1. +5 −4 src/nodes.coffee
  2. +2 −9 src/tame.coffee
View
9 src/nodes.coffee
@@ -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
11 src/tame.coffee
@@ -4,12 +4,5 @@ exports.AstTamer = class AstTamer
constructor: (rest...) ->
transform: (x) ->
- x.walkTaming()
- x
-
-
-
-
-
-
-
+ x.walkTaming()
+ x
Please sign in to comment.
Something went wrong with that request. Please try again.