Skip to content

Commit

Permalink
ast: @name on Fun::show (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
satyr committed Oct 13, 2012
1 parent cb0d42b commit 2c1af51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,8 @@ exports.Fun = Fun = (function(superclass){
} function ctor$(){} ctor$.prototype = prototype;
prototype.children = ['params', 'body'];
prototype.show = function(){
return this.bound;
var that;
return [this.name] + [(that = this.bound) ? "~" + that : void 8];
};
prototype.named = function(it){
return this.name = it, this.statement = true, this;
Expand Down
2 changes: 1 addition & 1 deletion src/ast.co
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ class exports.Fun extends Node

children: <[ params body ]>

show: -> @bound
show: -> [@name] + ["~#that" if @bound]

named: -> import {name: it, +statement}

Expand Down

0 comments on commit 2c1af51

Please sign in to comment.