Skip to content

Commit

Permalink
Fix Issue #55, and version bump to 1.4.0b
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtaco committed Jan 31, 2013
1 parent fb16015 commit b53cdfc
Show file tree
Hide file tree
Showing 22 changed files with 49 additions and 31 deletions.
6 changes: 3 additions & 3 deletions extras/coffee-script-iced-large.js

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

6 changes: 3 additions & 3 deletions extras/coffee-script-iced.js

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

8 changes: 4 additions & 4 deletions extras/coffee-script.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/coffee-script/browser.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/cake.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/coffee-script/coffee-script.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/command.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/grammar.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/helpers.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/iced.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/icedlib.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/index.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/lexer.js

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

10 changes: 7 additions & 3 deletions lib/coffee-script/nodes.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/optparse.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/repl.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/rewriter.js

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

2 changes: 1 addition & 1 deletion lib/coffee-script/scope.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "IcedCoffeeScript",
"keywords": ["javascript", "language", "coffeescript", "compiler"],
"author": "Maxwell Krohn",
"version": "1.4.0a",
"version": "1.4.0b",
"licenses": [{
"type": "MIT",
"url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE"
Expand Down
2 changes: 1 addition & 1 deletion src/coffee-script.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ else if require.registerExtension
require.registerExtension e, (content) -> compile content

# The current CoffeeScript version number.
exports.VERSION = '1.4.0a'
exports.VERSION = '1.4.0b'

# Words that cannot be used as identifiers in CoffeeScript code
exports.RESERVED = RESERVED
Expand Down
7 changes: 6 additions & 1 deletion src/nodes.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,12 @@ exports.Switch = class Switch extends Base
icedCallContinuation : ->
for [condition,block] in @cases
block.icedThreadReturn()
@otherwise?.icedThreadReturn()
if @otherwise?
@otherwise.icedThreadReturn()
else
# See github issue #55. If no else: was specified,
# we still need to call back the current continuation
@otherwise = new Block [ new IcedTailCall ]

compileNode: (o) ->
idt1 = o.indent + TAB
Expand Down
9 changes: 9 additions & 0 deletions test/iced.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ atest "for k,v in arr testing", (cb) ->
s += v + " " + i + " "
cb( s is "the 0 quick 1 brown 2 ", {} )

atest "switch --- github issue #55", (cb) ->
await delay defer()
switch "blah"
when "a"
await delay defer()
when "b"
await delay defer()
cb( true, {} )

atest "switch-a-roos", (cb) ->
res = 0
for i in [0..4]
Expand Down

0 comments on commit b53cdfc

Please sign in to comment.