From 60c9b94656c4329929fe8c5294899de42a3e3eff Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Tue, 10 Apr 2012 17:26:23 -0400 Subject: [PATCH] CoffeeScript 1.3.1 (quick bugfix for compound assignment to a global variable --- documentation/coffee/block_comment.coffee | 2 +- documentation/docs/coffee-script.html | 2 +- documentation/docs/nodes.html | 3 ++- documentation/index.html.erb | 4 ++-- documentation/js/aliases.js | 2 +- documentation/js/array_comprehensions.js | 2 +- documentation/js/block_comment.js | 4 ++-- documentation/js/cake_tasks.js | 2 +- documentation/js/classes.js | 2 +- documentation/js/comparisons.js | 2 +- documentation/js/conditionals.js | 2 +- documentation/js/default_args.js | 2 +- documentation/js/do.js | 2 +- documentation/js/embedded.js | 2 +- documentation/js/existence.js | 2 +- documentation/js/expressions.js | 2 +- documentation/js/expressions_assignment.js | 2 +- documentation/js/expressions_comprehension.js | 2 +- documentation/js/expressions_try.js | 2 +- documentation/js/fat_arrow.js | 2 +- documentation/js/functions.js | 2 +- documentation/js/heredocs.js | 2 +- documentation/js/heregexes.js | 2 +- documentation/js/interpolation.js | 2 +- documentation/js/multiple_return_values.js | 2 +- documentation/js/object_comprehensions.js | 2 +- documentation/js/object_extraction.js | 2 +- documentation/js/objects_and_arrays.js | 2 +- documentation/js/objects_reserved.js | 2 +- documentation/js/overview.js | 2 +- documentation/js/parallel_assignment.js | 2 +- documentation/js/patterns_and_splats.js | 2 +- documentation/js/prototypes.js | 2 +- documentation/js/range_comprehensions.js | 2 +- documentation/js/scope.js | 2 +- documentation/js/slices.js | 2 +- documentation/js/soaks.js | 2 +- documentation/js/splats.js | 2 +- documentation/js/splices.js | 2 +- documentation/js/strings.js | 2 +- documentation/js/switch.js | 2 +- documentation/js/try.js | 2 +- documentation/js/while.js | 2 +- extras/coffee-script.js | 4 ++-- index.html | 10 +++++----- lib/coffee-script/browser.js | 2 +- lib/coffee-script/cake.js | 2 +- lib/coffee-script/coffee-script.js | 4 ++-- lib/coffee-script/command.js | 2 +- lib/coffee-script/grammar.js | 2 +- lib/coffee-script/helpers.js | 2 +- lib/coffee-script/index.js | 2 +- lib/coffee-script/lexer.js | 2 +- lib/coffee-script/nodes.js | 2 +- lib/coffee-script/optparse.js | 2 +- lib/coffee-script/repl.js | 2 +- lib/coffee-script/rewriter.js | 2 +- lib/coffee-script/scope.js | 2 +- package.json | 2 +- src/coffee-script.coffee | 2 +- 60 files changed, 69 insertions(+), 68 deletions(-) diff --git a/documentation/coffee/block_comment.coffee b/documentation/coffee/block_comment.coffee index dbeb59a0..cb292ca1 100644 --- a/documentation/coffee/block_comment.coffee +++ b/documentation/coffee/block_comment.coffee @@ -1,5 +1,5 @@ ### -CoffeeScript Compiler v1.3.0 +CoffeeScript Compiler v1.3.1 Released under the MIT License ### diff --git a/documentation/docs/coffee-script.html b/documentation/docs/coffee-script.html index 5ce3816f..1802d648 100644 --- a/documentation/docs/coffee-script.html +++ b/documentation/docs/coffee-script.html @@ -13,7 +13,7 @@ execute all scripts present in text/coffeescript tags.

content = compile fs.readFileSync(filename, 'utf8'), {filename} module._compile content, filename else if require.registerExtension - require.registerExtension '.coffee', (content) -> compile content

The current CoffeeScript version number.

exports.VERSION = '1.3.0'

Words that cannot be used as identifiers in CoffeeScript code

exports.RESERVED = RESERVED

Expose helpers for testing.

exports.helpers = require './helpers'

Compile a string of CoffeeScript code to JavaScript, using the Coffee/Jison + require.registerExtension '.coffee', (content) -> compile content

The current CoffeeScript version number.

exports.VERSION = '1.3.1'

Words that cannot be used as identifiers in CoffeeScript code

exports.RESERVED = RESERVED

Expose helpers for testing.

exports.helpers = require './helpers'

Compile a string of CoffeeScript code to JavaScript, using the Coffee/Jison compiler.

exports.compile = compile = (code, options = {}) ->
   {merge} = exports.helpers
   try
diff --git a/documentation/docs/nodes.html b/documentation/docs/nodes.html
index 69533b5b..569acb13 100644
--- a/documentation/docs/nodes.html
+++ b/documentation/docs/nodes.html
@@ -850,7 +850,8 @@ for details.

< if o.level < LEVEL_LIST then code else "(#{code})"

When compiling a conditional assignment, take care to ensure that the operands are only evaluated once, even though we have to reference them more than once.

  compileConditional: (o) ->
-    [left, right] = @variable.cacheReference o

Disallow conditional assignment of undefined variables.

    if left.base instanceof Literal and left.base.value != "this" and not o.scope.check left.base.value
+    [left, right] = @variable.cacheReference o

Disallow conditional assignment of undefined variables.

    if not left.properties.length and left.base instanceof Literal and 
+           left.base.value != "this" and not o.scope.check left.base.value
       throw new Error "the variable \"#{left.base.value}\" can't be assigned with #{@context} because it has not been defined."
     if "?" in @context then o.isExistentialEquals = true
     new Op(@context[...-1], left, new Assign(right, @value, '=') ).compile o

Compile the assignment from an array splice literal, using JavaScript's diff --git a/documentation/index.html.erb b/documentation/index.html.erb index a569477b..17fa1dd1 100644 --- a/documentation/index.html.erb +++ b/documentation/index.html.erb @@ -135,7 +135,7 @@

Latest Version: - 1.3.0 + 1.3.1

@@ -1105,7 +1105,7 @@ Expressions

- 1.3.0 + 1.3.1 April 10, 2012