Skip to content

Commit

Permalink
fixed chaining onto with
Browse files Browse the repository at this point in the history
  • Loading branch information
satyr committed Oct 19, 2012
1 parent 30b433d commit 67592e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/grammar.js
Expand Up @@ -25,7 +25,7 @@ bnf = {
}), o('LET CALL( ArgList OptComma )CALL Block', function(){
return Chain(Call['let']($3, $6));
}), o('WITH Expression Block', function(){
return new Cascade($2, $3);
return Chain(new Cascade($2, $3));
})
],
List: [
Expand Down
2 changes: 1 addition & 1 deletion lib/parser.js

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

2 changes: 1 addition & 1 deletion src/grammar.co
Expand Up @@ -68,7 +68,7 @@ bnf =

o 'LET CALL( ArgList OptComma )CALL Block' -> Chain Call.let $3, $6

o 'WITH Expression Block' -> new Cascade $2, $3
o 'WITH Expression Block' -> Chain new Cascade $2, $3

# An array or object
List:
Expand Down
3 changes: 2 additions & 1 deletion test/literal.co
Expand Up @@ -432,7 +432,8 @@ a = with [2 7 1 8 2]
&sort!
&shift!
&pop!
eq '2,2,3,7' ''+a
.join ''
eq \2237 a

eq
& &, &
Expand Down

0 comments on commit 67592e1

Please sign in to comment.