Skip to content

Commit

Permalink
Coco ce2d08a: removed _argN temporaries for readability/consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Nov 21, 2010
1 parent 835244f commit 0e4d589
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 72 deletions.
4 changes: 2 additions & 2 deletions lib/coffee-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
_ref = this.tokens[this.pos++] || [''], tag = _ref[0], this.yytext = _ref[1], this.yylineno = _ref[2];
return tag;
},
setInput: function(_arg) {
this.tokens = _arg;
setInput: function(tokens) {
this.tokens = tokens;
return this.pos = 0;
},
upcomingInput: function() {
Expand Down
130 changes: 69 additions & 61 deletions lib/nodes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/optparse.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/rewriter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions lib/scope.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/nodes.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,12 @@ exports.Param = class Param extends Base

asReference: (o) ->
return @reference if @reference
node = if @isComplex() then new Literal o.scope.freeVariable 'arg' else @name
node = @name
if node.this
node = node.properties[0].name
node = new Literal '_' + node.value if node.value.reserved
else if node.isComplex()
node = new Literal o.scope.freeVariable 'arg'
node = new Value node
node = new Splat node if @splat
@reference = node
Expand Down

0 comments on commit 0e4d589

Please sign in to comment.