diff --git a/lib/coffee-script.js b/lib/coffee-script.js index 4b548cd4..cea350b6 100755 --- a/lib/coffee-script.js +++ b/lib/coffee-script.js @@ -55,15 +55,12 @@ lexer = new Lexer; parser.lexer = { lex: function() { - var token; - token = this.tokens[this.pos] || [""]; - this.pos += 1; - this.yylineno = token[2]; - this.yytext = token[1]; - return token[0]; + var tag, _ref; + _ref = this.tokens[this.pos++] || [''], tag = _ref[0], this.yytext = _ref[1], this.yylineno = _ref[2]; + return tag; }, - setInput: function(tokens) { - this.tokens = tokens; + setInput: function(_arg) { + this.tokens = _arg; return this.pos = 0; }, upcomingInput: function() { diff --git a/src/coffee-script.coffee b/src/coffee-script.coffee index 5221a356..dd946aae 100755 --- a/src/coffee-script.coffee +++ b/src/coffee-script.coffee @@ -76,14 +76,11 @@ lexer = new Lexer # directly as a "Jison lexer". parser.lexer = lex: -> - token = @tokens[@pos] or [""] - @pos += 1 - this.yylineno = token[2] - this.yytext = token[1] - token[0] - setInput: (tokens) -> - @tokens = tokens - @pos = 0 - upcomingInput: -> "" + [tag, @yytext, @yylineno] = @tokens[@pos++] or [''] + tag + setInput: (@tokens) -> + @pos = 0 + upcomingInput: -> + "" parser.yy = require './nodes'