Permalink
...
Comparing changes
Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
jashkenas/coffeescript
CDR2003/coffee-script-lua
CreamCoderz/coffee-script
Crylock/coffee-script
GeoffreyBooth/coffeescript
Gregg/coffee-script
JulianBirch/coffee-script-1
JustinTulloss/coffee-script
MichaelBlume/coffee-script
NightMigera/coffeescript
PandaWood/coffee-script
ProximaMonkey/coffee-script
Remcoman/coffee-script
RicardoSaracino/coffee-script
SE7ENSKY/matescript
STRd6/coffee-script
ShawnFumo/coffee-script
StanAngeloff/coffee-script
Xepo/coffee-script
abi/coffee-script
agnoster/coffee-script
ahjohannessen/coffee-script
akiellor/coffee-script
alanning/coffee-script
allanberger/coffee-script
almost/coffee-script
alubbe/coffee-script
andrehjr/coffee-script
andrewschaaf/coffee-script
andreypopp/coffee-script
apanda/coffee-script
baoshitang/coffee-script
barberboy/coffee-script
benatkin/coffee-script
benbria/coffee-script
benekastah/coffee-script
bjouhier/coffee-script
blahutka/coffee-script
blossom/coffee-script
bolinfest/coffee-script
breckinloggins/coffee-script
carmelyne/contracts.coffee
chajath/coffee-script
charles-cai/coffee-script
charliesome/coffee-script
chetan51/coffee-script
chip/coffee-script
codelahoma/coffee-script
coffee-js/coffee-script
coffee-void/coffeescript
collin/coffee-script
danemorgridge/coffee-script
daveclarke/coffee-script
daveyoon/coffee-script
dbrans/coffee-script
deadprogram/coffee-script
devongovett/coffee-script
dget/coffee-script
disnet/contracts.coffee
dmohl/coffee-script
dohse/coffee-script
dqminh/coffee-script
drewlesueur/coffee-script
eventualbuddha/coffee-script
evilpie/coffee-script
excellentdrums/coffee-script
fitzgen/coffee-script
fizx/coffee-script
geraldalewis/coffee-script
germanocaldeira/coffee-script
gfodor/coffee-script
ghuntley/coffee-script
goodwink/coffee-script
gxela/coffee-script
hayeah/coffee-script
hbt/coffee-script
helixbass/copheescript
hleumas/coffee-script
holtwick/moccacino
hugs/coffee-script
ianthehenry/protoscript
ich/caffeine
janlelis/angular-coffee-script
jaredwy/coffee-script
jasonyandell/coffee-script
jawj/coffee-script
jbca/coffeescript
jiangmiao/toffee-script
jlstr/coffee-script
joelturnbull/coffee-script
johnsang/coffee-script
joliss/coffee-script
jondistad/coffee-script
joshprice/coffee-script
jstrachan/coffee-script
jugglinmike/irene-script
juilyoon/coffee-script
keichii/coffee-script
keithnorm/coffee-script
kewinwang/coffee-script
khaled/coffee-script
leeight/coffee-script
level1/coffee-script
lfendy/coffee-script
loganfsmyth/coffee-script
loopinfinito/coffeescript.com.br
lorensr/coffee-script
loveencounterflow/coffy-script
lukhnos/doubleshot
lynaghk/coffee-script
martco/coffee-script
maxtaco/coffee-script
mbbx6spp/coffee-script
mblinn/coffee-script
mehmeta/coffee-script
melcher/coffee-script
mental/coffee-script
mhart/coffee-script
michaelficarra/coffee-script
misfo/coffee-script
mizchi/coffee-script
mlinderm/coffee-script
mrlauer/coffee-script-monads
muratmeran/coffee-script
myang/coffee-script
nanqiu/coffee-script
neobine/coffee-script
netconstructor/coffee-script
nickjs/coffee-script
nihar/coffee-script
onilabs/coffee-script
paiq/blackcoffee
parkerl/coffee-script
paulmars/coffee-script
peick/coffee-script
pjaspers/coffee-script
plambert/coffee-script
poutyface/coffee-script
pschyska/coffee-script
ptoomey3/coffee-script
quangv/coffee-script
revence27/coffee-script
rkJun/coffee-script
robarondaz/coffee-script
robotlolita/coffee-script
rolftimmermans/coffee-script
rpl/coffee-script
runeb/coffee-script
rwaldron/coffee-script
rymohr/coffee-script
ryszard/coffee-script
samcday/coffee-script
sarang25491/coffee-script
satyr/coffee-script
seedjs/coffee-script
sequoiar/coffee-script
sgraham/coffee-script
shariefsk/coffee-script
shesek/coffee-script
shimaore/cake
siefkenj/gjscoffee-script
smhanov/coffee-script
soutaro/coffee-script
spaghetticode/coffee-script
sparecycles/coffee-script
spencerelliott/coffee-script
sstephenson/coffee-script
stephank/coffee-script
strangemonad/coffee-script
swistak/coffee-script
syg/heap.coffee
taku0/coffee-script
tanob/coffee-script
tglines/coffee-script
thdtjsdn/coffee-script
theIntuitionist/coffee-script
thedeeno/coffee-script
thejh/coffee-script
timruffles/coffee-script
tkpage/coffee-script
tlrobinson/coffee-script
tmishra/coffee-script
tobee/coffee-script
tomelam/coffee-script
tosh/coffee-script
tswicegood/coffee-script
ttilley/coffee-script
twilson63/coffee-script
up2u0609/coffee-script
vanviegen/coffee-script
vjpr/coffee-script
vol4ok/coffee-script
walski/coffee-script
wearefractal/yerbascript
willmoffat/coffee-script
xixixao/coffee-script
yihuang/coffee-script
zaach/coffee-script
zmthy/coffee-script
zot/coffee-script
Nothing to show
Choose a base branch
Choose a Head Repository
jashkenas/coffeescript
CDR2003/coffee-script-lua
CreamCoderz/coffee-script
Crylock/coffee-script
GeoffreyBooth/coffeescript
Gregg/coffee-script
JulianBirch/coffee-script-1
JustinTulloss/coffee-script
MichaelBlume/coffee-script
NightMigera/coffeescript
PandaWood/coffee-script
ProximaMonkey/coffee-script
Remcoman/coffee-script
RicardoSaracino/coffee-script
SE7ENSKY/matescript
STRd6/coffee-script
ShawnFumo/coffee-script
StanAngeloff/coffee-script
Xepo/coffee-script
abi/coffee-script
agnoster/coffee-script
ahjohannessen/coffee-script
akiellor/coffee-script
alanning/coffee-script
allanberger/coffee-script
almost/coffee-script
alubbe/coffee-script
andrehjr/coffee-script
andrewschaaf/coffee-script
andreypopp/coffee-script
apanda/coffee-script
baoshitang/coffee-script
barberboy/coffee-script
benatkin/coffee-script
benbria/coffee-script
benekastah/coffee-script
bjouhier/coffee-script
blahutka/coffee-script
blossom/coffee-script
bolinfest/coffee-script
breckinloggins/coffee-script
carmelyne/contracts.coffee
chajath/coffee-script
charles-cai/coffee-script
charliesome/coffee-script
chetan51/coffee-script
chip/coffee-script
codelahoma/coffee-script
coffee-js/coffee-script
coffee-void/coffeescript
collin/coffee-script
danemorgridge/coffee-script
daveclarke/coffee-script
daveyoon/coffee-script
dbrans/coffee-script
deadprogram/coffee-script
devongovett/coffee-script
dget/coffee-script
disnet/contracts.coffee
dmohl/coffee-script
dohse/coffee-script
dqminh/coffee-script
drewlesueur/coffee-script
eventualbuddha/coffee-script
evilpie/coffee-script
excellentdrums/coffee-script
fitzgen/coffee-script
fizx/coffee-script
geraldalewis/coffee-script
germanocaldeira/coffee-script
gfodor/coffee-script
ghuntley/coffee-script
goodwink/coffee-script
gxela/coffee-script
hayeah/coffee-script
hbt/coffee-script
helixbass/copheescript
hleumas/coffee-script
holtwick/moccacino
hugs/coffee-script
ianthehenry/protoscript
ich/caffeine
janlelis/angular-coffee-script
jaredwy/coffee-script
jasonyandell/coffee-script
jawj/coffee-script
jbca/coffeescript
jiangmiao/toffee-script
jlstr/coffee-script
joelturnbull/coffee-script
johnsang/coffee-script
joliss/coffee-script
jondistad/coffee-script
joshprice/coffee-script
jstrachan/coffee-script
jugglinmike/irene-script
juilyoon/coffee-script
keichii/coffee-script
keithnorm/coffee-script
kewinwang/coffee-script
khaled/coffee-script
leeight/coffee-script
level1/coffee-script
lfendy/coffee-script
loganfsmyth/coffee-script
loopinfinito/coffeescript.com.br
lorensr/coffee-script
loveencounterflow/coffy-script
lukhnos/doubleshot
lynaghk/coffee-script
martco/coffee-script
maxtaco/coffee-script
mbbx6spp/coffee-script
mblinn/coffee-script
mehmeta/coffee-script
melcher/coffee-script
mental/coffee-script
mhart/coffee-script
michaelficarra/coffee-script
misfo/coffee-script
mizchi/coffee-script
mlinderm/coffee-script
mrlauer/coffee-script-monads
muratmeran/coffee-script
myang/coffee-script
nanqiu/coffee-script
neobine/coffee-script
netconstructor/coffee-script
nickjs/coffee-script
nihar/coffee-script
onilabs/coffee-script
paiq/blackcoffee
parkerl/coffee-script
paulmars/coffee-script
peick/coffee-script
pjaspers/coffee-script
plambert/coffee-script
poutyface/coffee-script
pschyska/coffee-script
ptoomey3/coffee-script
quangv/coffee-script
revence27/coffee-script
rkJun/coffee-script
robarondaz/coffee-script
robotlolita/coffee-script
rolftimmermans/coffee-script
rpl/coffee-script
runeb/coffee-script
rwaldron/coffee-script
rymohr/coffee-script
ryszard/coffee-script
samcday/coffee-script
sarang25491/coffee-script
satyr/coffee-script
seedjs/coffee-script
sequoiar/coffee-script
sgraham/coffee-script
shariefsk/coffee-script
shesek/coffee-script
shimaore/cake
siefkenj/gjscoffee-script
smhanov/coffee-script
soutaro/coffee-script
spaghetticode/coffee-script
sparecycles/coffee-script
spencerelliott/coffee-script
sstephenson/coffee-script
stephank/coffee-script
strangemonad/coffee-script
swistak/coffee-script
syg/heap.coffee
taku0/coffee-script
tanob/coffee-script
tglines/coffee-script
thdtjsdn/coffee-script
theIntuitionist/coffee-script
thedeeno/coffee-script
thejh/coffee-script
timruffles/coffee-script
tkpage/coffee-script
tlrobinson/coffee-script
tmishra/coffee-script
tobee/coffee-script
tomelam/coffee-script
tosh/coffee-script
tswicegood/coffee-script
ttilley/coffee-script
twilson63/coffee-script
up2u0609/coffee-script
vanviegen/coffee-script
vjpr/coffee-script
vol4ok/coffee-script
walski/coffee-script
wearefractal/yerbascript
willmoffat/coffee-script
xixixao/coffee-script
yihuang/coffee-script
zaach/coffee-script
zmthy/coffee-script
zot/coffee-script
Nothing to show
Choose a head branch
17
contributors
Commits on Nov 15, 2013
|
|
alubbe |
removed 'yield' from the reserved keywords
|
f51cbd7
|
|||
|
|
alubbe |
added 'yield' to the unary keywords
|
dafc7bd
|
|||
|
|
alubbe |
using 'yield' automatically turns functions into generators
|
9941050
|
Commits on Nov 30, 2013
Commits on Dec 01, 2013
|
|
alubbe |
improved readability of cakefile generator check
|
85c7fff
|
Commits on Dec 03, 2013
|
|
alubbe |
further improved readability of cakefile generator check
|
f4b850d
|
Commits on Dec 05, 2013
|
|
alubbe |
fixed misspelling in Cakefile
|
c02a403
|
|||
|
|
alubbe |
Merge github.com:jashkenas/coffee-script
|
e100020
|
Commits on Dec 19, 2013
|
|
alubbe |
first attempt at using '->*" and '=>*' for generators
|
56b04a5
|
Commits on Dec 20, 2013
|
|
alubbe |
'->*' and '=>*' now produce generators
|
dab4ae9
|
Commits on Dec 24, 2013
|
|
alubbe |
first attempt at including 'yield*'
|
25b1eee
|
Commits on Dec 26, 2013
|
|
alubbe |
updated lexer to allow 'yield*'
|
64e78a2
|
Commits on Dec 28, 2013
|
|
alubbe |
'yield*' now works as expected
|
1e377ed
|
Commits on Jan 26, 2014
|
|
alubbe |
Merge https://github.com/jashkenas/coffee-script
Conflicts: lib/coffee-script/lexer.js lib/coffee-script/parser.js lib/coffee-script/rewriter.js src/lexer.coffee src/rewriter.coffee |
f375394
|
Commits on May 08, 2014
|
|
jashkenas |
merged
|
6ae21ae
|
Commits on Jun 23, 2014
|
|
gscottolson |
Retina favicon.ico
|
ba4157b
|
Commits on Jun 26, 2014
|
|
vendethiel |
Update link to "CoffeeScript Ristretto", fixes #3489
|
1157b32
|
Commits on Jul 23, 2014
|
|
vendethiel |
Fix the "Examples" link on coffeescript.org
It now points to the "Trending repositories" of the month. |
e8c96de
|
Commits on Aug 26, 2014
|
|
jashkenas |
merged
|
53aa50f
|
Commits on Aug 27, 2014
|
|
epmatsw |
Quick spelling fixes
|
94c467b
|
|||
|
|
michaelficarra |
Merge pull request #3616 from epmatsw/spelling
Quick spelling fixes |
8b066f1
|
Commits on Aug 28, 2014
|
|
josh |
Remove josh/nack from Examples
|
872092f
|
|||
|
|
josh |
Add Atom to Examples
|
9dfd71b
|
|||
|
|
michaelficarra |
Merge pull request #3618 from josh/update-site-example-projects
Refresh site Examples section |
b407a59
|
Commits on Sep 06, 2014
Commits on Sep 17, 2014
|
|
lbeschastny |
Fixed jashkenas/coffeescript#3638 - invalid block comments compilation
|
55e3b6b
|
|||
|
|
lbeschastny |
Added test for jashkenas/coffeescript#3638
|
77d5b95
|
Commits on Sep 19, 2014
|
|
jashkenas |
Merge pull request #3240 from alubbe/master
using 'yield' automatically turns functions into generators |
a78cbe7
|
Commits on Sep 23, 2014
|
|
jashkenas |
Merge pull request #3638 from lbeschastny/issue3638
Invalid block comments compilation |
158ca0d
|
Commits on Oct 12, 2014
|
|
Artazor |
Added failing test case for the `yield` precedence
|
e8a4e93
|
|||
|
|
Artazor |
Improved test readability + fixed integer divison
|
ec44aba
|
Commits on Oct 13, 2014
|
|
alubbe |
implemented proper precedence for 'yield'
|
dd5da7f
|
|||
|
|
jashkenas |
Merge pull request #3677 from alubbe/master
implemented proper precedence for 'yield' |
4f82e59
|
Commits on Oct 27, 2014
|
|
jashkenas |
Merge pull request #3521 from gscottolson/master
Retina favicon.ico |
f2a3f75
|
Commits on Oct 29, 2014
Commits on Nov 17, 2014
|
|
jashkenas |
add Die Alternative to books section
|
485aa8e
|
Commits on Nov 21, 2014
|
|
alubbe |
fixed yield keyword not working in switch & for loop expressions
|
a9fbf14
|
|||
|
|
alubbe |
added tests for yield in switch & for loop expressions
|
5950d63
|
|||
|
|
jashkenas |
Merge pull request #3734 from alubbe/master
fixed yield keyword not working in switch & for loop expressions |
4199f4f
|
Commits on Dec 03, 2014
|
|
sscotth |
include logo .svg files
|
931b74e
|
|||
|
|
jashkenas |
Merge pull request #3748 from sscotth/master
Include logo .svg files |
8e4fb1b
|
Commits on Jan 04, 2015
|
|
lydell |
Refactor interpolation (and string and regex) handling in lexer
- Fix #3394: Unclosed single-quoted strings (both regular ones and heredocs) used to pass through the lexer, causing a parsing error later, while double-quoted strings caused an error already in the lexing phase. Now both single and double-quoted unclosed strings error out in the lexer (which is the more logical option) with consistent error messages. This also fixes the last comment by @satyr in #3301. - Similar to the above, unclosed heregexes also used to pass through the lexer and not error until in the parsing phase, which resulted in confusing error messages. This has been fixed, too. - Fix #3348, by adding passing tests. - Fix #3529: If a string starts with an interpolation, an empty string is no longer emitted before the interpolation (unless it is needed to coerce the interpolation into a string). - Block comments cannot contain `*/`. Now the error message also shows exactly where the offending `*/`. This improvement might seem unrelated, but I had to touch that code anyway to refactor string and regex related code, and the change was very trivial. Moreover, it's consistent with the next two points. - Regexes cannot start with `*`. Now the error message also shows exactly where the offending `*` is. (It might actually not be exatly at the start in heregexes.) It is a very minor improvement, but it was trivial to add. - Octal escapes in strings are forbidden in CoffeeScript (just like in JavaScript strict mode). However, this used to be the case only for regular strings. Now they are also forbidden in heredocs. Moreover, the errors now point at the offending octal escape. - Invalid regex flags are no longer allowed. This includes repeated modifiers and unknown ones. Moreover, invalid modifiers do not stop a heregex from being matched, which results in better error messages. - Fix #3621: `///a#{1}///` compiles to `RegExp("a" + 1)`. So does `RegExp("a#{1}")`. Still, those two code snippets used to generate different tokens, which is a bit weird, but more importantly causes problems for coffeelint (see clutchski/coffeelint#340). This required lots of tests in test/location.coffee to be updated. Note that some updates to those tests are unrelated to this point; some have been updated to be more consistent (I discovered this because the refactored code happened to be seemingly more correct). - Regular regex literals used to erraneously allow newlines to be escaped, causing invalid JavaScript output. This has been fixed. - Heregexes may now be completely empty (`//////`), instead of erroring out with a confusing message. - Fix #2388: Heredocs and heregexes used to be lexed simply, which meant that you couldn't nest a heredoc within a heredoc (double-quoted, that is) or a heregex inside a heregex. - Fix #2321: If you used division inside interpolation and then a slash later in the string containing that interpolation, the division slash and the latter slash was erraneously matched as a regex. This has been fixed. - Indentation inside interpolations in heredocs no longer affect how much indentation is removed from each line of the heredoc (which is more intuitive). - Whitespace is now correctly trimmed from the start and end of strings in a few edge cases. - Last but not least, the lexing of interpolated strings now seems to be more efficient. For a regular double-quoted string, we used to use a custom function to find the end of it (taking interpolations and interpolations within interpolations etc. into account). Then we used to re-find the interpolations and recursively lex their contents. In effect, the same string was processed twice, or even more in the case of deeper nesting of interpolations. Now the same string is processed just once. - Code duplication between regular strings, heredocs, regular regexes and heregexes has been reduced. - The above two points should result in more easily read code, too. |
0dcff50
|
|||
|
|
lydell |
Point "missing )/}/]" errors to the unclosed (/{/[
Previously such errors pointed at the end of the input, which wasn't very
helpful. This is also consistent with unclosed strings, where the errors point
at the opening quote.
Note that this includes unclosed #{ (interpolations). |
ae6df88
|
|||
|
|
michaelficarra |
Merge pull request #3770 from lydell/interpolations
Refactor interpolation (and string and regex) handling in lexer |
b70f657
|
Commits on Jan 05, 2015
|
|
mbrio |
Fix issue #3498
|
8e299b0
|
|||
|
|
jashkenas |
Merge pull request #3771 from mbrio/master
Fix issue #3498 |
c478f28
|
Commits on Jan 06, 2015
|
|
lydell |
Fix #2516, #3560: Unicode space handling
It is possible to match only valid JavaScript identifiers with a really long regex (like coco and CoffeeScriptRedux does), but CoffeeScript uses a much simpler one, which allows a bit too much. Quoting jashkenas/coffeescript#1718 #issuecomment-2152464 @jashkenas: > But it still seems very much across the "worth it" line. You'll get the > SyntaxError as soon as it hits JS, and performance aside -- even the increase > in filesize for our browser coffee-script.js lib seems too much, considering > this is something no one ever does, apart from experimentation. In short, CoffeeScript treats any non-ASCII character as part of an identifier. However, unicode spaces should be excluded since having blank characters as part of a _word_ is very confusing. This commit does so, while still keeping the regex really simple. |
9ec427b
|
|||
|
|
jashkenas |
Merge pull request #3774 from lydell/unicode-spaces
|
e769423
|
Commits on Jan 09, 2015
|
|
lydell |
Fix #3598: Make unary + and - generate _refs
Before commit c056c93 `Op::isComplex()` used to return true always. As far as I understand, that commit attempts to exclude code such as `+1` and `-2` from being marked as complex (and thus getting cached into `_ref` variables sometimes). CoffeeScript is supposed to generate readable output so that choice is understandable. However, it also excludes code such as `+a` (by mistake I believe), which can cause `a` to be coerced multiple times. This commit fixes this by only excluding unary + and - ops followed by a number. |
2439877
|
Commits on Jan 10, 2015
|
|
lydell |
Fix #3410, #3182: Allow regex to start with space or =
A regex may not follow a specific set of tokens. These were already known before in the `NOT_REGEX` and `NOT_SPACED_REGEX` arrays. (However, I've refactored them to be more correct and to add a few missing tokens). In all other cases (except after a spaced callable) a slash is the start of a regex, and may now start with a space or an equals sign. It’s really that simple! A slash after a spaced callable is the only ambigous case. We cannot know if that's division or function application with a regex as the argument. The spacing determines which is which: Space on both sides: - `a / b/i` -> `a / b / i` - `a /= b/i` -> `a /= b / i` No spaces: - `a/b/i` -> `a / b / i` - `a/=b/i` -> `a /= b / i` Space on the right side: - `a/ b/i` -> `a / b / i` - `a/= b/i` -> `a /= b / i` Space on the left side: - `a /b/i` -> `a(/b/i)` - `a /=b/i` -> `a(/=b/i)` The last case used to compile to `a /= b / i`, but that has been changed to be consistent with the `/` operator. The last case really looks like a regex, so it should be parsed as one. Moreover, you may now also space the `/` and `/=` operators with other whitespace characters than a space (such as tabs and non-breaking spaces) for consistency. Lastly, unclosed regexes are now reported as such, instead of generating some other confusing error message. It should perhaps also be noted that apart from escaping (such as `a /\ b/`) you may now also use parentheses to disambiguate division and regex: `a (/ b/)`. See #3182 (comment). |
8fd6258
|
|||
|
|
lydell |
Fix #3671: Allow step in optimized range comprehensions
Allow the `by c` part in `for [a..b] by c then`. Continue disallowing a `when d` part, since it makes no sense having a guard that isn't given access to anything that changes on every iteration. |
a63009f
|
|||
|
|
michaelficarra |
Merge pull request #3783 from lydell/issue-3671
Fix #3671: Allow step in optimized range comprehensions |
e0ad0d7
|
|||
|
|
michaelficarra |
Merge pull request #3777 from lydell/unary-plus-minus-refs
Fix #3598: Make unary + and - generate _refs |
ac2e540
|
|||
|
|
michaelficarra |
Merge pull request #3782 from lydell/regex
|
bec8f27
|
|||
|
|
josh |
Add test for reserved keywords as parameters
|
23a691a
|
|||
|
|
lydell |
Fix #1500, #1574, #3318: Name generated vars uniquely
Any variables generated by CoffeeScript are now made sure to be named to something not present in the source code being compiled. This way you can no longer interfere with them, either on purpose or by mistake. (#1500, #1574) For example, `({a}, _arg) ->` now compiles correctly. (#1574) As opposed to the somewhat complex implementations discussed in #1500, this commit takes a very simple approach by saving all used variables names using a single pass over the token stream. Any generated variables are then made sure not to exist in that list. `(@a) -> a` used to be equivalent to `(@a) -> @a`, but now throws a runtime `ReferenceError` instead (unless `a` exists in an upper scope of course). (#3318) `(@a) ->` used to compile to `(function(a) { this.a = a; })`. Now it compiles to `(function(_at_a) { this.a = _at_a; })`. (But you cannot access `_at_a` either, of course.) Because of the above, `(@a, a) ->` is now valid; `@a` and `a` are not duplicate parameters. Duplicate this-parameters with a reserved word, such as `(@case, @case) ->`, used to compile but now throws, just like regular duplicate parameters. |
8ab15d7
|
Commits on Jan 11, 2015
|
|
lydell |
Allow variables named like helper functions
|
a469786
|
Commits on Jan 12, 2015
|
|
lydell |
Better error message for unexpected CALL_END
|
6271206
|
Commits on Jan 13, 2015
|
|
michaelficarra |
Merge pull request #3788 from lydell/unexpected-call-end
Better error message for unexpected CALL_END |
efd7ebb
|
|||
|
|
michaelficarra |
Merge pull request #3784 from lydell/unique-generated-vars
Unique generated vars |
9fa77af
|
|||
|
|
lydell |
Get rid of `Scope.root` hack
Using the static property `Scope.root` for the top-level scope of a file is a hack, which makes it impossible to have several independent `Scope` instances at the same time (should we ever need that). This commit makes every instance have a reference to its root instead. |
22f1952
|
|||
|
|
lydell |
Fix #3502: Define param variables when expansion
|
4c2c472
|
|||
|
|
michaelficarra |
Merge pull request #3790 from lydell/scope-root
Get rid of `Scope.root` hack |
4bf45ff
|
Commits on Jan 14, 2015
|
|
michaelficarra |
Merge pull request #3791 from lydell/issue-3502
Fix #3502: Define param variables when expansion |
669e7fe
|
|||
|
|
lydell |
Fix #3194: Make strings always uncallable
No matter if they have interpolations or not. |
fce502a
|
Commits on Jan 15, 2015
|
|
lydell |
Make CoffeeScript work with jison 0.4.14+
Since zaach/jison commit 3548861b, `parser.lexer` is never modified anymore (a copy of it is made, and that copy is modified instead). CoffeeScript itself modifies `parser.lexer` and then accesses those modifications in the custom `parser.yy.parseError` function, but that of course does not work anymore. This commit puts the data that `parser.yy.parseError` needs directly on the `parser` so that it is not lost. Supersedes #3603. Fixes #3608 and zaach/jison#243. |
28c07d3
|
|||
|
|
michaelficarra |
Merge pull request #3794 from lydell/jison-update
Make CoffeeScript work with jison 0.4.14+ |
67aaa8b
|
|||
|
|
lydell |
Make regexes always uncallable
No matter if they have interpolations or not. |
3db029f
|
Commits on Jan 16, 2015
|
|
michaelficarra |
Merge pull request #3792 from lydell/issue-3194
Fix #3194: Make strings always uncallable |
5d1d1b7
|
|||
|
|
lydell |
Fix #1316: Interpolate interpolations safely
Instead of compiling to `"" + + (+"-");`, `"#{+}-"'` now gives an appropriate
error message:
[stdin]:1:5: error: unexpected end of interpolation
"#{+}-"
^
This is done by _always_ (instead of just sometimes) wrapping the interpolations
in parentheses in the lexer. Unnecessary parentheses won't be output anyway.
I got tired of updating the tests in test/location.coffee (which I had enough of
in #3770), which relies on implementation details (the exact amount of tokens
generated for a given string of code) to do their testing, so I refactored them
to be less fragile. |
05b3707
|
|||
|
|
michaelficarra |
Merge pull request #3787 from lydell/single-token-interpolation
Fix #1316: Interpolate interpolations safely |
7d6f617
|
Commits on Jan 20, 2015
|
|
ogennadi |
Fixed broken link
|
42dde38
|
Commits on Jan 21, 2015
|
|
michaelficarra |
Merge pull request #3798 from ogennadi/patch-1
Fixed broken link |
68c0e2d
|
|||
|
|
ysmood |
Decouple "mkdirp"
Make coffee completely independent. |
74fc712
|
Commits on Jan 26, 2015
|
|
lydell |
Fix #3804: Provide list of referenced vars to REPL
Supersedes #3805. Here is a comparison of master, #3805 and this commit: # master $ bin/coffee coffee> 1 %% 2 TypeError: Array.prototype.indexOf called on null or undefined # #3805 $ bin/coffee coffee> 1 %% 2 1 coffee> (_results = null; i) for i in [1, 2, 3] TypeError: Cannot call method 'push' of null # this commit $ bin/coffee coffee> 1 %% 2 1 coffee> (_results = null; i) for i in [1, 2, 3] [ 1, 2, 3 ] |
8ed691e
|
|||
|
|
michaelficarra |
Merge pull request #3807 from lydell/repl-fix
Fix #3804: Provide list of referenced vars to REPL |
518d7c1
|
|||
|
|
lydell |
Fix broken CoffeeScript APIs
As evidenced in #3804, commit 8ab15d7 broke the CoffeeScript API. The REPL uses those APIs, but wasn't updated in that commit. Still, that shouldn't have _broken_ the REPL. The reason it broke is because the added _option_ 'referencedVars' wasn't actually _optional;_ if it was omitted code that relies on it being set broke. This commit defaults that option to an empty array, which makes things behave exactly like before when the 'referencedVars' option is omitted. |
54a4560
|
|||
|
|
michaelficarra |
Merge pull request #3808 from lydell/api-break-fix
Fix broken CoffeeScript APIs |
dca915a
|
Commits on Jan 28, 2015
|
|
xfq |
Update index.html.js
Node comes with npm installed and "npm" is not an abbreviation for "Node Package Manager". |
f288d20
|
|||
|
|
michaelficarra |
Merge pull request #3812 from xfq/patch-1
Update index.html.js |
2f0724f
|
|||
|
|
ysmood |
Add test for mkdirp
|
3d58b4c
|
|||
|
|
ysmood |
Optimize the mkdirp test
|
90a1cba
|
Commits on Jan 29, 2015
Unified
Split
Showing
with
3,786 additions
and 2,413 deletions.
- +6 −0 Cakefile
- +27 −0 bower.json
- +8 −0 documentation/coffee/generators.coffee
- +8 −8 documentation/docs/browser.html
- +3 −3 documentation/docs/cake.html
- +105 −78 documentation/docs/coffee-script.html
- +69 −44 documentation/docs/command.html
- +8 −3 documentation/docs/grammar.html
- +25 −25 documentation/docs/helpers.html
- +1 −1 documentation/docs/index.html
- +438 −542 documentation/docs/lexer.html
- +104 −78 documentation/docs/nodes.html
- +1 −1 documentation/docs/optparse.html
- +4 −4 documentation/docs/register.html
- +77 −45 documentation/docs/repl.html
- +35 −34 documentation/docs/rewriter.html
- +16 −12 documentation/docs/scope.html
- +1 −1 documentation/docs/sourcemap.html
- +77 −86 documentation/docs/underscore.html
- BIN documentation/images/favicon.ico
- +25 −0 documentation/images/just_logo.svg
- +59 −0 documentation/images/logo.svg
- +41 −11 documentation/index.html.js
- +1 −1 documentation/js/aliases.js
- +1 −1 documentation/js/array_comprehensions.js
- +1 −1 documentation/js/block_comment.js
- +2 −2 documentation/js/cake_tasks.js
- +1 −1 documentation/js/chaining.js
- +5 −5 documentation/js/classes.js
- +1 −1 documentation/js/comparisons.js
- +1 −1 documentation/js/conditionals.js
- +1 −1 documentation/js/constructor_destructuring.js
- +1 −1 documentation/js/default_args.js
- +1 −1 documentation/js/do.js
- +1 −1 documentation/js/embedded.js
- +1 −1 documentation/js/existence.js
- +1 −1 documentation/js/expansion.js
- +1 −1 documentation/js/expressions.js
- +1 −1 documentation/js/expressions_assignment.js
- +1 −1 documentation/js/expressions_comprehension.js
- +1 −1 documentation/js/expressions_try.js
- +1 −1 documentation/js/fat_arrow.js
- +1 −1 documentation/js/functions.js
- +13 −0 documentation/js/generators.js
- +1 −1 documentation/js/heredocs.js
- +1 −1 documentation/js/heregexes.js
- +2 −2 documentation/js/interpolation.js
- +1 −1 documentation/js/multiple_return_values.js
- +2 −2 documentation/js/object_comprehensions.js
- +1 −1 documentation/js/object_extraction.js
- +1 −1 documentation/js/objects_and_arrays.js
- +1 −1 documentation/js/objects_reserved.js
- +1 −1 documentation/js/overview.js
- +1 −1 documentation/js/parallel_assignment.js
- +1 −1 documentation/js/patterns_and_splats.js
- +1 −1 documentation/js/prototypes.js
- +1 −1 documentation/js/range_comprehensions.js
- +1 −1 documentation/js/scope.js
- +1 −1 documentation/js/slices.js
- +1 −1 documentation/js/soaks.js
- +1 −1 documentation/js/splats.js
- +1 −1 documentation/js/splices.js
- +1 −1 documentation/js/strings.js
- +1 −1 documentation/js/switch.js
- +1 −1 documentation/js/switch_with_no_expression.js
- +1 −1 documentation/js/try.js
- +2 −2 documentation/js/while.js
- +6 −6 extras/coffee-script.js
- +103 −38 index.html
- +2 −2 lib/coffee-script/browser.js
- +2 −2 lib/coffee-script/cake.js
- +42 −27 lib/coffee-script/coffee-script.js
- +24 −5 lib/coffee-script/command.js
- +13 −2 lib/coffee-script/grammar.js
- +3 −3 lib/coffee-script/helpers.js
- +1 −1 lib/coffee-script/index.js
- +293 −314 lib/coffee-script/lexer.js
- +178 −145 lib/coffee-script/nodes.js
- +4 −4 lib/coffee-script/optparse.js
- +317 −320 lib/coffee-script/parser.js
- +1 −1 lib/coffee-script/register.js
- +20 −7 lib/coffee-script/repl.js
- +7 −7 lib/coffee-script/rewriter.js
- +17 −11 lib/coffee-script/scope.js
- +3 −3 lib/coffee-script/sourcemap.js
- +3 −5 package.json
- +25 −11 src/coffee-script.coffee
- +14 −1 src/command.coffee
- +6 −1 src/grammar.coffee
- +264 −294 src/lexer.coffee
- +63 −38 src/nodes.coffee
- +9 −3 src/repl.coffee
- +5 −4 src/rewriter.coffee
- +13 −9 src/scope.litcoffee
- +32 −0 test/arrays.coffee
- +52 −0 test/assignment.coffee
- +19 −0 test/comments.coffee
- +26 −0 test/compilation.coffee
- +11 −0 test/comprehensions.coffee
- +380 −1 test/error_messages.coffee
- +2 −1 test/eval.coffee
- +43 −2 test/functions.coffee
- +126 −0 test/generators.coffee
- +1 −1 test/helpers.coffee
- +18 −0 test/interpolation.coffee
- +50 −93 test/location.coffee
- +62 −0 test/operators.coffee
- +219 −9 test/regexps.coffee
- +1 −1 test/sourcemap.coffee
- +19 −8 test/strict.coffee
- +85 −6 test/strings.coffee
View
6
Cakefile
| @@ -276,6 +276,12 @@ runTests = (CoffeeScript) -> | ||
| # Run every test in the `test` folder, recording failures. | ||
| files = fs.readdirSync 'test' | ||
| + | ||
| + # Ignore generators test file if generators are not available | ||
| + generatorsAreAvailable = '--harmony' in process.execArgv or | ||
| + '--harmony-generators' in process.execArgv | ||
| + files.splice files.indexOf('generators.coffee'), 1 if not generatorsAreAvailable | ||
| + | ||
| for file in files when helpers.isCoffee file | ||
| literate = helpers.isLiterate file | ||
| currentFile = filename = path.join 'test', file | ||
View
27
bower.json
| @@ -0,0 +1,27 @@ | ||
| +{ | ||
| + "name": "coffee-script", | ||
| + "version": "1.9.0", | ||
| + "main": [ | ||
| + "lib/coffee-script/coffee-script.js" | ||
| + ], | ||
| + "description": "Unfancy JavaScript", | ||
| + "keywords": [ | ||
| + "javascript", | ||
| + "language", | ||
| + "coffeescript", | ||
| + "compiler" | ||
| + ], | ||
| + "devDependencies": { | ||
| + "uglify-js": "~2.2", | ||
| + "jison": ">=0.2.0", | ||
| + "highlight.js": "~8.0.0", | ||
| + "underscore": "~1.5.2", | ||
| + "docco": "~0.6.2" | ||
| + }, | ||
| + "author": { | ||
| + "name": "Jeremy Ashkenas" | ||
| + }, | ||
| + "ignore": [ | ||
| + "test" | ||
| + ] | ||
| +} |
View
8
documentation/coffee/generators.coffee
| @@ -0,0 +1,8 @@ | ||
| +perfectSquares = -> | ||
| + num = 0 | ||
| + loop | ||
| + num += 1 | ||
| + yield num * num | ||
| + return | ||
| + | ||
| +window.ps or= perfectSquares() |
View
16
documentation/docs/browser.html
| @@ -140,7 +140,7 @@ | ||
| </div> | ||
| - <div class="content"><div class='highlight'><pre>CoffeeScript.<span class="hljs-function"><span class="hljs-title">eval</span> = <span class="hljs-params">(code, options = {})</span> -></span> | ||
| + <div class="content"><div class='highlight'><pre>CoffeeScript.e<span class="hljs-function"><span class="hljs-title">val</span> = <span class="hljs-params">(code, options = {})</span> -></span> | ||
| options.bare ?= <span class="hljs-literal">on</span> | ||
| eval compile code, options</pre></div></div> | ||
| @@ -157,7 +157,7 @@ | ||
| </div> | ||
| - <div class="content"><div class='highlight'><pre>CoffeeScript.<span class="hljs-function"><span class="hljs-title">run</span> = <span class="hljs-params">(code, options = {})</span> -></span> | ||
| + <div class="content"><div class='highlight'><pre>CoffeeScript.r<span class="hljs-function"><span class="hljs-title">un</span> = <span class="hljs-params">(code, options = {})</span> -></span> | ||
| options.bare = <span class="hljs-literal">on</span> | ||
| options.shiftLine = <span class="hljs-literal">on</span> | ||
| Function(compile code, options)()</pre></div></div> | ||
| @@ -193,7 +193,7 @@ | ||
| </div> | ||
| <div class="content"><div class='highlight'><pre><span class="hljs-keyword">if</span> btoa? <span class="hljs-keyword">and</span> JSON? <span class="hljs-keyword">and</span> unescape? <span class="hljs-keyword">and</span> encodeURIComponent? | ||
| - <span class="hljs-function"><span class="hljs-title">compile</span> = <span class="hljs-params">(code, options = {})</span> -></span> | ||
| +<span class="hljs-function"> <span class="hljs-title">compile</span> = <span class="hljs-params">(code, options = {})</span> -></span> | ||
| options.sourceMap = <span class="hljs-literal">true</span> | ||
| options.inline = <span class="hljs-literal">true</span> | ||
| {js, v3SourceMap} = CoffeeScript.compile code, options | ||
| @@ -212,15 +212,15 @@ | ||
| </div> | ||
| - <div class="content"><div class='highlight'><pre>CoffeeScript.<span class="hljs-function"><span class="hljs-title">load</span> = <span class="hljs-params">(url, callback, options = {}, hold = <span class="hljs-literal">false</span>)</span> -></span> | ||
| + <div class="content"><div class='highlight'><pre>CoffeeScript.l<span class="hljs-function"><span class="hljs-title">oad</span> = <span class="hljs-params">(url, callback, options = {}, hold = <span class="hljs-literal">false</span>)</span> -></span> | ||
| options.sourceFiles = [url] | ||
| xhr = <span class="hljs-keyword">if</span> <span class="hljs-built_in">window</span>.ActiveXObject | ||
| <span class="hljs-keyword">new</span> <span class="hljs-built_in">window</span>.ActiveXObject(<span class="hljs-string">'Microsoft.XMLHTTP'</span>) | ||
| <span class="hljs-keyword">else</span> | ||
| <span class="hljs-keyword">new</span> <span class="hljs-built_in">window</span>.XMLHttpRequest() | ||
| xhr.open <span class="hljs-string">'GET'</span>, url, <span class="hljs-literal">true</span> | ||
| xhr.overrideMimeType <span class="hljs-string">'text/plain'</span> <span class="hljs-keyword">if</span> <span class="hljs-string">'overrideMimeType'</span> <span class="hljs-keyword">of</span> xhr | ||
| - xhr.<span class="hljs-function"><span class="hljs-title">onreadystatechange</span> = -></span> | ||
| + xhr.o<span class="hljs-function"><span class="hljs-title">nreadystatechange</span> = -></span> | ||
| <span class="hljs-keyword">if</span> xhr.readyState <span class="hljs-keyword">is</span> <span class="hljs-number">4</span> | ||
| <span class="hljs-keyword">if</span> xhr.status <span class="hljs-keyword">in</span> [<span class="hljs-number">0</span>, <span class="hljs-number">200</span>] | ||
| param = [xhr.responseText, options] | ||
| @@ -250,8 +250,8 @@ | ||
| coffeetypes = [<span class="hljs-string">'text/coffeescript'</span>, <span class="hljs-string">'text/literate-coffeescript'</span>] | ||
| coffees = (s <span class="hljs-keyword">for</span> s <span class="hljs-keyword">in</span> scripts <span class="hljs-keyword">when</span> s.type <span class="hljs-keyword">in</span> coffeetypes) | ||
| index = <span class="hljs-number">0</span> | ||
| - | ||
| - <span class="hljs-function"><span class="hljs-title">execute</span> = -></span> | ||
| +<span class="hljs-function"> | ||
| + <span class="hljs-title">execute</span> = -></span> | ||
| param = coffees[index] | ||
| <span class="hljs-keyword">if</span> param <span class="hljs-keyword">instanceof</span> Array | ||
| CoffeeScript.run param... | ||
| @@ -263,7 +263,7 @@ | ||
| options = <span class="hljs-attribute">literate</span>: script.type <span class="hljs-keyword">is</span> coffeetypes[<span class="hljs-number">1</span>] | ||
| <span class="hljs-keyword">if</span> script.src | ||
| CoffeeScript.load script.src, | ||
| - <span class="hljs-function"><span class="hljs-params">(param)</span> -></span> | ||
| +<span class="hljs-function"> <span class="hljs-params">(param)</span> -></span> | ||
| coffees[i] = param | ||
| execute() | ||
| options | ||
View
6
documentation/docs/cake.html
| @@ -260,7 +260,7 @@ | ||
| </div> | ||
| - <div class="content"><div class='highlight'><pre><span class="hljs-built_in">exports</span>.<span class="hljs-function"><span class="hljs-title">run</span> = -></span> | ||
| + <div class="content"><div class='highlight'><pre>exports.r<span class="hljs-function"><span class="hljs-title">un</span> = -></span> | ||
| <span class="hljs-built_in">global</span>.__originalDirname = fs.realpathSync <span class="hljs-string">'.'</span> | ||
| process.chdir cakefileDirectory __originalDirname | ||
| args = process.argv[<span class="hljs-number">2.</span>.] | ||
| @@ -314,8 +314,8 @@ | ||
| <span class="hljs-built_in">console</span>.error message + <span class="hljs-string">'\n'</span> | ||
| <span class="hljs-built_in">console</span>.log <span class="hljs-string">'To see a list of all tasks/options, run "cake"'</span> | ||
| process.exit <span class="hljs-number">1</span> | ||
| - | ||
| -<span class="hljs-function"><span class="hljs-title">missingTask</span> = <span class="hljs-params">(task)</span> -></span> fatalError <span class="hljs-string">"No such task: <span class="hljs-subst">#{task}</span>"</span></pre></div></div> | ||
| +<span class="hljs-function"> | ||
| +<span class="hljs-title">missingTask</span> = <span class="hljs-params">(task)</span> -></span> fatalError <span class="hljs-string">"No such task: <span class="hljs-subst">#{task}</span>"</span></pre></div></div> | ||
| </li> | ||
Oops, something went wrong.
Showing you all comments on commits in this comparison.
|
Holy hell. This patch is awesome! Bravo @lydell. |
|
This seem to have introduced the following code in parser.js (around line 637):
The "_token_stack:" seem to be misplaced and causes a compilation error when I am trying to load the module. It doesn't look like it is being used either. |