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 .
...
This comparison is big! We’re only showing the most recent 250 commits
Commits on Dec 24, 2009
@jashkenas waypoint 0a58eee
@jashkenas first draft of docs are done 705b293
@jashkenas added readme 417753b
@jashkenas added some execution test b743e32
@jashkenas with a more comprehensive execution test that uncovered some missing …
…spots
fb13a30
@jashkenas fixed the broken try/catch grammar 47928ca
@jashkenas added comprehensive linting to the test suit 849f0e4
@jashkenas changing switch/case to switch/when -- it's a better word 8d76f4b
@jashkenas doc tweaks 726a9b2
@jashkenas added a wish list to the docs c438123
@jashkenas docs 840e2b8
@jashkenas another wish 2e8f03b
@jashkenas added the instanceof operator to the grammar as an operation node 5d1ec9d
@jashkenas added the typeof operater as an OpNode 7f50254
@jashkenas bumping to 0.1.1 bfb24c6
@jashkenas docs for 0.1.1 39ceca4
@jashkenas first, totally broken branch of significant whitespace -- it can hand…
…le examples/whitespace.cs though
aafd3cd
@jashkenas this might not work for ))) outdent cases da84906
@jashkenas added and -> &&, or -> || to the docs (they were missing) ed504ea
tlrobinson Read from stdin if source is "-" 0824818
tlrobinson Narwhal support for CoffeeScript dbccc1f
tlrobinson Command line CoffeeScript 9f80998
@jashkenas outdent lexing is correct now, I think 73a0777
@jashkenas ... c3ff752
@jashkenas Merge branch 'master' of git://github.com/tlrobinson/coffee-script 46f81c2
@jashkenas with a working -n --no-wrap option to disable the top-level function …
…safety wrapper
e27756c
@jashkenas document that -e can read from stdin 42ca566
@jashkenas removing the special-case std-reading in favor of '--eval' a80b532
Commits on Dec 25, 2009
@jashkenas fixing super() calls, thanks to tolmasky 47812d9
@jashkenas got extends back in the language -- use it together with super 1c83e68
@jashkenas bumping to 0.1.2 to get the super()/extends fix out there 65e9ba4
@jashkenas allowing quoted strings within object assignment, a in JS and JSON 95bfb0b
@jashkenas trading aint for isnt -- let's be serious 985e0a0
@jashkenas updating docs for isnt 93009e0
@jashkenas the --no-wrap option now disables top-level var declarations 9b23264
@jashkenas fixed the bin/cs repl to save assignment between commands by using th…
…e new --no-wrap
378e156
tlrobinson Print compiler errors to stderr 2f35bba
@jashkenas removed dependency on v8 in favor of bin/cs 6865f5b
@jashkenas making all assignment-y operators use a colon -- now it's +: -: *: /:…
…, and friends
beae912
@jashkenas sped up the execution test a good deal by running it all in one pass d8ceb3b
@jashkenas the narwhal integration written in JavaScript has been replaced with …
…CoffeeScript, and compiler-generated variable names now start with '__'
2d57ee6
@jashkenas majorly cleaned up the CoffeeScript that defines the Narwhal integration 7a0de52
@jashkenas removed bin/cs in favor of a more comprehensive coffee-script command…
… ... now with --interactive and --run
73aaf12
@jashkenas better error warnings on the command line e7e8e24
@jashkenas bumping to 0.1.3 ... here we go c4ba971
@jashkenas allowing chained function calls, one right after another 851ec82
@jashkenas added a test to make sure that chained calls work 968aeec
@jashkenas going back to familiar operators +: is just too strange 55bf0a2
@jashkenas allowing = to assign bc6ec37
@jashkenas make equals signs full equals of colons -- you can use them inside of…
… object literals now too
4b5db11
@jashkenas cleaned up the for grammar and eliminated a shift/reduce conflict 763e04f
@jashkenas ForBody is really the ForSource f55b4cd
@jashkenas stopped using __proto__, instead, using a variant of goog.inherits fo…
…r extends and super()
e494d52
@jashkenas moved the coffeescript extension over from .cs to .coffee -- let's le…
…ave C# in peace. Changed array comprehensions to always return their mapped result, even when unassigned
d46bf8e
@jashkenas CoffeeScript 0.1.4 62485c2
Commits on Dec 26, 2009
@jashkenas reorganizing test fixtures and adding range literals for array slices 1ba7c77
@jashkenas documenting ranges and slices dd5317e
@jashkenas comment 52700ca
@jashkenas don't add the no_wrap key to the options hash unless we're going to u…
…se it
b58102c
@jashkenas started raising syntax errors for parens wrapped around expressions (…
…they used to silently be ignored)
7c132d6
@jashkenas major internal reworking -- all variable declarations have been pushe…
…d up to the first line of the block scope -- all assignment is now an inherent expression
adaae0c
@jashkenas docs for assignment-as-expression 8344421
@jashkenas added array comprehensions over ranges ff78546
@jashkenas trading the cs> prompt for the coffee> prompt d59ef71
@jashkenas fixed range comprehension indexing 6a30d48
@jashkenas changed bin/coffee-script to bin/coffee 3c67d54
@jashkenas docs 2a1fc4b
@jashkenas adding newline escaping, with tests 08dddb2
@jashkenas merging in master 5bed564
@jashkenas little more progress on whitespace 556f8cb
@jashkenas got a lexer working along the lines of what kamatsu proposes 191875a
@jashkenas removing no_paren -- can cause order of operations errors fde9852
@jashkenas removing no_paren -- it was optimizing away order of operations 694833d
@jashkenas smarter but uglier lexer -- now handles most significant whitespace c…
…ases. Clean it up though... (newlines after outdents)
cc0c92d
Commits on Dec 27, 2009
@jashkenas that's it for now for significant whitespace -- I really just can't m…
…ake flexible enough
b4250c0
@jashkenas got negative ranges working with (much, much) uglier compiled code eeef8d3
@jashkenas docs for range comprehensiosn 983dac8
@jashkenas coffeescript 0.1.5, just for kicks 097bede
@jashkenas more underscore, and removing custom_assign and return from condition…
…al compilation
d7dd18b
@jashkenas more underscore and bugfix edits to code generation 3ee4e98
@jashkenas more underscore examples 55e736c
@jashkenas fixing paths for running
coffee compiles CoffeeScript source files into JavaScript.

Usage:
  coffee path/to/script.coffee
    -i, --interactive                run a CoffeeScript REPL (requires Narwhal)
    -r, --run                        compile and run a script (requires Narwhal)
    -o, --output [DIR]               set the directory for compiled JavaScript
    -w, --watch                      watch scripts for changes, and recompile
    -p, --print                      print the compiled JavaScript to stdout
    -l, --lint                       pipe the compiled JavaScript through JSLint
    -e, --eval                       compile a cli scriptlet or read from stdin
    -t, --tokens                     print the tokens that the lexer produces
    -v, --verbose                    print at every step of code generation
    -n, --no-wrap                    raw output, no safety wrapper or vars
        --install-bundle             install the CoffeeScript TextMate bundle
        --version                    display CoffeeScript version
    -h, --help                       display this help message outside of the coffee-script directory
7ae8687
@jashkenas CoffeeScript 0.1.6 -- bugfixes ac00a19
Commits on Dec 28, 2009
@jashkenas part of the way to supporting multiline array comprehensions -- the g…
…rammar and parsing is there -- the code generation is tricky
aa45456
tlrobinson Fixed Narwhal integration. Cleaned up module organization, etc. 55616cf
tlrobinson Merge branch 'master' of git://github.com/jashkenas/coffee-script 78e08f3
tlrobinson Add package on command line in case it's not installed in a Narwhal p…
…ackages path.
a722b42
@jashkenas removing broken accidental commit 845c8cb
tlrobinson Add package.json to gemspec files so Narwhal integrations works when …
…installed as a gem.
3762f4c
@jashkenas merging in tlrobinson's fix for package.json 9e47f6b
@jashkenas rebuilding narwhal libs 41f3d54
@jashkenas stop shifting args a186e47
@jashkenas fixing relative path for execution tests c84bb0c
Commits on Dec 29, 2009
@jashkenas removed unused example 7b5b261
@jashkenas merging in master bb84a98
@jashkenas got lexer balancing parens, indent/outdents, brackets, and curlies 50bdd26
@jashkenas first draft of kamatsu's rewrite rules -- finally got whitespace to b…
…e flexible enough, I think.
ddd52a1
@jashkenas moving along with whitespace cea417d
@jashkenas using 'where' for array comprehension filtering, after kamatsu's sugg…
…estion -- execution tests pass now with significant whitespace
3fbb870
@jashkenas still some kinks to work out -- mid-expression blocks f44443b
@jashkenas allowing indentation in object and array literals a3129e0
@jashkenas changing array comprehension filters from 'where' to 'when' to mirror…
… case/when
ae112d6
@jashkenas killing some newlines in the execution tests, to test the lexer's new…
…line suppression
96803d0
@jashkenas don't break trailing commas with rewrite_closing_parens f5aafc6
Commits on Dec 30, 2009
@jashkenas put the commas on the outside of expression closers fd35787
@jashkenas whitespace parser down to 4 shift/reduce errors -- good enough for me 541291e
@jashkenas implementing kamatsu's debt-based lexer for closing delimiters d3ab60d
@jashkenas touch-ups cleanups to the lexer and rebuilding the narwhal libs from …
…whitespace'd versions
dd3c9ab
@jashkenas clean up a couple of test errors for whitespace 90051e9
@jashkenas removing dots from whitespace examples 6ddd808
@jashkenas ignoring test.coffee 7c97f32
@jashkenas fixing the double-printing bug with coffee -r ce0e71f
@jashkenas merged in master branch again 4d514f2
@jashkenas patched up lexer to add indentation to single-line flavors of stateme…
…nts -- let's expand this idea
ea58be2
@jashkenas fixin up narwhal factory and adding more implicit blocks to the lexer f93e552
@jashkenas fixing up narwhal integration (again) 9e3ef42
@jashkenas patching up the lexer and adding a test with trailing whitespace (it …
…was too string for trailing whitespace before)
c822f96
@jashkenas execution tests still pass -- more lexer block insertion and 2 shift/…
…reduces in the grammar now
9a946d2
@jashkenas special case for 'else if' in the lexer d528db7
@jashkenas removed the final shift/reduce errors -- back to zero for the first t…
…ime in a long time
62c5100
@jashkenas parser and test tweaks for whitespace -- tests are coming along 9a7c075
@jashkenas adding ')' as a SINGLE_CLOSER, although it's probably unsafe 5659d1b
@jashkenas fixing up documents example ed1c1f7
@jashkenas balancing parens closing single-line blocks e6cd32f
@jashkenas big milestone. examples/code.coffee now compiles correctly under the …
…new whitespace regime
cd68f02
Commits on Dec 31, 2009
@jashkenas be more vigorous about removing mid-expression newlines, 'when' close…
…s implicit blocks, a better comment-detecting regex lexer that doesn't eat outdents
dc821f2
@jashkenas rewrote 'rewrite_closing_parens' with an explicit loop -- there was a…
… bug when adding to @tokens in the middle of scan_tokens' while loop -- consider scan_tokens to be on probation until further notice
5c7b77a
@jashkenas fixed up the comment/assignment interleaving in nodes.rb c8711b4
@jashkenas regex cleanup -- eliminating some lookahead because Ruby regexps blow…
… chunks (stackoverflows) when you look (ahead) at them funny.
d43d491
@jashkenas rolling back MULTI_DENT regex 4971465
@jashkenas more fiddling with the lexer -- the indentation is super fragile fd83759
@jashkenas more fiddling with the lexer -- the indentation is super fragile bbbfd92
@jashkenas lex indents with higher precedence than comments cae0b1a
@jashkenas moving the newline escaping detection up higher so indents don't over…
…rule it
774e3d3
@jashkenas the underscore example parses now -- added line number information to…
… parenthetical nodes
dba8439
@jashkenas getting there, finally ... all tests are green for whitespace ec60205
@jashkenas don't print the confusing indentation numbers when raising ParseError…
…s for indentation
942572d
@jashkenas allowing any manner of indentation in the comments, by adjusting them…
… in the lexer
a6539a0
@jashkenas adding proper auto-newline escaping 8762162
@jashkenas making all functions named functions, if children of an immediate ass…
…ignment
e481a39
@jashkenas updating tests for named functions b1fa06f
@jashkenas updating docs -- need to get back on the computer that has the syntax…
… highlighter for UV installed
7f76c22
@jashkenas adding a test case for named functions f9d6301
@jashkenas adding a rake:ultraviolet build syntax highlighter task, and regenera…
…ting the docs with correct highlighting
20ade4f
@jashkenas pulled out all token-stream-rewriting logic into the CoffeeScript::Re…
…writer -- let the lexer be simpleminded
a376e7f
@jashkenas making assignment token detection a regex like all the others 2231d67
@jashkenas detailed scan_tokens so that the calling function can indicate the nu…
…mber of spaces to move forward (or backward) in the token stream
edf1fc7
@jashkenas done commenting the rewriter 4e8a12d
@jashkenas adding weepy's suggestion to use (for .. in) for array comprehensions…
…, which means that they're now object comprehensions as well
00538bd
@jashkenas using push for comprehension results so that it works with object key…
…s, and adding a test for object comprehensions
07d0044
@jashkenas adding a filtered object comprehension test 44fec92
@jashkenas enabling multi-line array and object comprehensions 7ec91a1
@jashkenas adding a test for multiline-array-comprehension-with-filter bfd7455
@jashkenas expressions nested in expressions made for some indentation issues --…
… statements are now responsible for their own leading indentation
f299972
@jashkenas adding splats to function definitions 1d2bb3b
@jashkenas reserving variables for splats the regular way, not through a custom …
…'var' declaration
26c89ce
@jashkenas comment about test_execution being the most important 43edd29
@jashkenas adding a note in the docs about how to build the parser and install t…
…he gem
abfc9f5
Commits on Jan 01, 2010
@jashkenas adding splats as arguments to function calls 409283a
@jashkenas fix for multiple splats in a function call 41056ca
@jashkenas fixing the regex lexer to make it less agressive when we know it can'…
…t possibly be a regex
ad5b5fa
@jashkenas allowing expressions within range literals caf9d62
@jashkenas test for uminus 2cef93b
@jashkenas adding a test for expressions in range comprehensions 02fbd28
@jashkenas allowing indentation within function calls a93a570
@jashkenas -- f622fc4
@jashkenas making range comprehensions compile safely, even when you assign to t…
…he same variable as your endposts.
305f883
@jashkenas fixing precedence order, so that you can nest range comprehensions e30a267
@jashkenas adding steps to range comprehensions 0f81dbe
@jashkenas expanding the list of tokens that regexes may not follow, according t…
…o the Mozilla JS 2.0 docs
2f69bc1
@jashkenas commenting the lexer a bit more 3489eec
@jashkenas adding the notion of existence -- postfixing an expression with a que…
…stion mark will check if to see if it's not null or undefined
ff80f8d
@jashkenas better existence test, with tests 75d9e23
@jashkenas adding consistent highlighting to variable assignment, whether functi…
…ons or values
34add7d
@jashkenas fixing the food/eat array comprehension in the docs to not pretend li…
…ke there's a made-up method on String.prototype
c3d0e50
Commits on Jan 02, 2010
@jashkenas rebuilding narwhal uncovered a bug with named functions 38520bf
@jashkenas adding splice literals, with tests 7ee5be6
@jashkenas todo 7eff878
Commits on Jan 03, 2010
@jashkenas Adding kamatsu's proposed block literal syntax 21a0cc8
@jashkenas adding a block test and using PARAM_SPLAT to remove the last shift/re…
…duce conflict
ba3c529
@jashkenas bumping version numbers to 0.2.0 in anticipation of release soon-ish de4eddc
@jashkenas first rough rough rough draft of kamatsu's closure suggestion -- test…
….coffee runs, but probably nothing else
78c4957
@jashkenas more progress -- you can wrap parentheses around statements now 4814d5b
@jashkenas All execution tests are now passing with statements everywhere 099944e
@jashkenas beautiful -- all examples, tests, and docs are now compiling without …
…JSLint warnings
6160fe3
@jashkenas removing the silly newlines from comments bb0dfa5
@jashkenas lowering the precedence of if/else/while 3724778
@jashkenas subtle call order bug was preventing variable declarations 56015bd
@jashkenas change lexical scoping example to use var names that haven't been alr…
…eady defined
bd2597c
@jashkenas fixing comment-within-objecta-and-array-literal printing for the new …
…expression regime.
97f16c0
@jashkenas logic error in Expressions was causing over-compilation by a factor o…
…f the depth of the tree
8e6486a
@jashkenas updating fixtures -- all tests now pass -- back to master d53d85d
@jashkenas adding a statement-as-expression test, and returning null from while …
…loops, if asked
cb18158
Commits on Jan 04, 2010
@jashkenas -- ecdb471
@jashkenas mo' expression examples 32cd15f
@jashkenas more underscore examples raised a slight bug with a lexing ambiguity …
…between leading whens (in switches), and trailing whens (in comprehensions) -- made two different tokens to distinguish them
672dd70
@jashkenas fixing a nasty little bug with not dup'ing a string in Scope.rb, caus…
…ing later functions to start their free_variables where previous functions left off, because they shared their ancestor's @temp_variable string
69283fc
@jashkenas pretty amazing -- fully functional draft of underscore.js 0.5.2, all …
…in CoffeeScript
f75d98e
@jashkenas putting in a special check for returns within array comprehensions --…
… not very nice
94bc7c1
@jashkenas more underscore 5efaff5
@jashkenas nicer scope inspects da9e388
@jashkenas removed the whole messy notions of looking downwards for returns or c…
…hildren -- ForNodes now peek at top-level status, and if they're being asked to return a value from the outside
2c1033f
Commits on Jan 05, 2010
@jashkenas minor doc updates -- let's try pulling in the underscore test suite 3e24cef
@jashkenas first pass at 0.2.0 docs 6e63a18
@jashkenas adding the complete underscore.coffee example to the docs ae60374
@jashkenas more docs for 0.2 -- blocks and splats 0cf7801
@jashkenas tweaking docs 724d4c9
@jashkenas more docs 6658250
@jashkenas alright, done fiddling. CoffeeScript 0.2.0 1ebc4d5
@jashkenas automatic conversion of arguments into arrays 5fe419b
@jashkenas docs for arguments conversion d555685
@jashkenas CoffeeScript 0.2.1 1040e52
Commits on Jan 06, 2010
@jashkenas ellipsis is the new splat c2bb93b
@jashkenas adding ranges as expressions, they get expanded into the equivalent a…
…rray
46f1977
@jashkenas fixing range literals by making them values, not expressions, and add…
…ing tests
001e42b
@jashkenas fixing weepy's comment scenario 0275e77
@jashkenas adding the 'in' operator 4fc40e4
@jashkenas comments de49465
@mattly mattly add folding for multi-line object literals 3124869
@mattly mattly if we escape the close-brackets, it won't think single-line objects n…
…eed folding
22d3238
@mattly mattly next time: don't copy the .tmDelta over the .tmLanguage 41bb6ed
Commits on Jan 07, 2010
@jashkenas adding empty return statements -- they return null fbcdc12
@jashkenas removing the parser.rb from revision control -- it's taking up too mu…
…ch space -- you'll have to generate it yourself with rake build:parser
eb9b183
@jashkenas ignoring the generated parser.rb c49f2d8
@jashkenas printing a warning when the parser goes missing a5c1922
@jashkenas adding a warning about parser.rb to the readme 3e33b4a
@jashkenas fixing the lexer to handle strings that end with a backslash character cf7079a
@jashkenas added the constructor fix for capitalized functions 9ed8020
@jashkenas adding automatic 'return this' for constructors: functions that start…
… with a Capital Letter
18c3e79
@jashkenas mentioning the racc gem in the readme fab98a2
Commits on Jan 08, 2010
@jashkenas weepy's new speedy comprehensions c70b6f3
@jashkenas cleaned up nodes.rb indentation code with an idt method 69908be
@jashkenas more node cleaning, using idt() instead of TAB 30dca13
@jashkenas separating out the --no-wrap and the --globals arguments, which shoul…
…dn't be jammed together
d416c18
@jashkenas making extends equivalent to the Google Closure version 8b3926f
@jashkenas fixing calling super from constructors 4c3f00c
Commits on Jan 09, 2010
@jashkenas adding body-less while expressions ae58e2e
@jashkenas adding test for body-less while, using null as the body so JSLint doe…
…sn't get in a tizzy
7befbdd
@jashkenas allowing chained calls broken up over multiple lines with periods at …
…the front (jQuery-style)
2319aff
@jashkenas allowing comments in the middle of switch statements 8e3922b
Commits on Jan 10, 2010
@jashkenas ignoring 'presentation' folder 9498ef9
@jashkenas better indentation for compile_closure 8ea7529
@jashkenas removing object comprehensions from CoffeeScript, they were necessita…
…ting the generation of too much ugly JS
13fc8ae
@jashkenas big commit -- adding back object comprehensions, using 'ino', versus …
…'in' for array comprehensions, fixing bug with dollar signs in identifiers
902febb
@jashkenas adding '::' as shorthand for '.prototype.' ad18378
@jashkenas updating comprehension speed test with the new normal comprehensions c265b7d
@jashkenas more docs for 0.2.2 de74bce
@jashkenas rebuilding underscore.coffee docs, adding a build task -- need to rem…
…ember to copy over nicer headers
3e987de
@jashkenas more docs, more tests bb5bf7f
@jashkenas caught a close call bug with object comprehensions and not specifying…
… the value
24408c7