From e638de5c7c4b29f980f2db902d061000c843f97f Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Mon, 26 Jul 2010 20:54:07 -0400 Subject: [PATCH] a couple more implicit objects in the source. --- src/cake.coffee | 3 +-- src/coffee-script.coffee | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cake.coffee b/src/cake.coffee index 0671ac94..aeef23f5 100644 --- a/src/cake.coffee +++ b/src/cake.coffee @@ -20,7 +20,7 @@ switches = [] oparse = null # Mixin the top-level Cake functions for Cakefiles to use directly. -helpers.extend global, { +helpers.extend global, # Define a Cake task with a short name, an optional sentence description, # and the function to run as the action itself. @@ -39,7 +39,6 @@ helpers.extend global, { missingTask name unless tasks[name] tasks[name].action options -} # Run `cake`. Executes all of the tasks you pass, in order. Note that Node's # asynchrony may cause tasks to execute in a different order than you'd expect. diff --git a/src/coffee-script.coffee b/src/coffee-script.coffee index 7970e9e2..926a0fe2 100644 --- a/src/coffee-script.coffee +++ b/src/coffee-script.coffee @@ -58,7 +58,7 @@ exports.run = ((code, options) -> # The real Lexer produces a generic stream of tokens. This object provides a # thin wrapper around it, compatible with the Jison API. We can then pass it # directly as a "Jison lexer". -parser.lexer = { +parser.lexer = lex: -> token = @tokens[@pos] or [""] @pos += 1 @@ -69,7 +69,6 @@ parser.lexer = { @tokens = tokens @pos = 0 upcomingInput: -> "" -} # Activate CoffeeScript in the browser by having it compile and evaluate # all script tags with a content-type of `text/coffeescript`. This happens