Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more cleanups, commenting and renames.

  • Loading branch information...
commit bf3ec76d12fd52bf7aabf30dd90e7ef0b921b9d5 1 parent 0a43c2a
@maxtaco authored
Showing with 10 additions and 15 deletions.
  1. +2 −4 lib/coffee-script/nodes.js
  2. +8 −11 src/nodes.coffee
View
6 lib/coffee-script/nodes.js
@@ -314,6 +314,8 @@
Base.prototype.tameCallContinuation = function() {};
+ Base.prototype.tameIsJump = NO;
+
Base.prototype.isStatement = NO;
Base.prototype.jumps = NO;
@@ -324,12 +326,8 @@
Base.prototype.isAssignable = NO;
- Base.prototype.isControlBreak = NO;
-
Base.prototype.isLoop = NO;
- Base.prototype.tameIsJump = NO;
-
Base.prototype.tameLoopFlag = false;
Base.prototype.tameNodeFlag = false;
View
19 src/nodes.coffee
@@ -251,25 +251,22 @@ exports.Base = class Base
child.tameCpsRotate()
this
- tameIsCpsPivot : -> @tameCpsPivotFlag
-
- tameNestContinuationBlock : (b) ->
- @tameContinuationBlock = b
-
- tameHasContinuation : -> @tameContinuationBlock
-
- tameCallContinuation : ->
+ tameIsCpsPivot : -> @tameCpsPivotFlag
+ tameNestContinuationBlock : (b) -> @tameContinuationBlock = b
+ tameHasContinuation : -> @tameContinuationBlock
+ tameCallContinuation : ->
+ tameIsJump : NO
isStatement : NO
jumps : NO
isComplex : YES
isChainable : NO
isAssignable : NO
- isControlBreak : NO
isLoop : NO
-
- tameIsJump : NO
+ # tame AST node flags -- since we make several passes through the
+ # tree setting these bits, we'll actually just flip bits in the nodes,
+ # rather than setting function pointers to YES or NO.
tameLoopFlag : false
tameNodeFlag : false
tameGotCpsSplitFlag : false
Please sign in to comment.
Something went wrong with that request. Please try again.