Jeremy Ashkenas
e6cd32f2fc
balancing parens closing single-line blocks
2009-12-30 18:52:03 -05:00
Jeremy Ashkenas
5659d1bd49
adding ')' as a SINGLE_CLOSER, although it's probably unsafe
2009-12-30 18:09:43 -05:00
Jeremy Ashkenas
9a7c075e06
parser and test tweaks for whitespace -- tests are coming along
2009-12-30 17:58:27 -05:00
Jeremy Ashkenas
62c51006a1
removed the final shift/reduce errors -- back to zero for the first time in a long time
2009-12-30 17:45:47 -05:00
Jeremy Ashkenas
d528db76e6
special case for 'else if' in the lexer
2009-12-30 17:41:14 -05:00
Jeremy Ashkenas
9a946d2ac5
execution tests still pass -- more lexer block insertion and 2 shift/reduces in the grammar now
2009-12-30 15:52:07 -05:00
Jeremy Ashkenas
c822f96145
patching up the lexer and adding a test with trailing whitespace (it was too string for trailing whitespace before)
2009-12-30 15:10:47 -05:00
Jeremy Ashkenas
9e3ef42c63
fixing up narwhal integration (again)
2009-12-30 15:05:05 -05:00
Jeremy Ashkenas
f93e552cb3
fixin up narwhal factory and adding more implicit blocks to the lexer
2009-12-30 14:32:59 -05:00
Jeremy Ashkenas
ea58be2838
patched up lexer to add indentation to single-line flavors of statements -- let's expand this idea
2009-12-30 13:58:00 -05:00
Jeremy Ashkenas
4d514f255b
merged in master branch again
2009-12-30 13:38:50 -05:00
Jeremy Ashkenas
ce0e71f796
fixing the double-printing bug with coffee -r
2009-12-30 13:34:25 -05:00
Jeremy Ashkenas
6ddd808f74
removing dots from whitespace examples
2009-12-30 00:22:27 -05:00
Jeremy Ashkenas
dd3c9abe15
touch-ups cleanups to the lexer and rebuilding the narwhal libs from whitespace'd versions
2009-12-29 23:01:08 -05:00
Jeremy Ashkenas
d3ab60df78
implementing kamatsu's debt-based lexer for closing delimiters
2009-12-29 22:24:52 -05:00
Jeremy Ashkenas
541291e2f3
whitespace parser down to 4 shift/reduce errors -- good enough for me
2009-12-29 21:46:15 -05:00
Jeremy Ashkenas
fd357871f2
put the commas on the outside of expression closers
2009-12-29 20:39:51 -05:00
Jeremy Ashkenas
f5aafc6591
don't break trailing commas with rewrite_closing_parens
2009-12-29 10:20:18 -05:00
Jeremy Ashkenas
ae112d6087
changing array comprehension filters from 'where' to 'when' to mirror case/when
2009-12-29 09:55:37 -05:00
Jeremy Ashkenas
a3129e05ae
allowing indentation in object and array literals
2009-12-29 09:25:56 -05:00
Jeremy Ashkenas
f44443b58a
still some kinks to work out -- mid-expression blocks
2009-12-29 09:18:41 -05:00
Jeremy Ashkenas
3fbb870d01
using 'where' for array comprehension filtering, after kamatsu's suggestion -- execution tests pass now with significant whitespace
2009-12-29 08:52:26 -05:00
Jeremy Ashkenas
cea417de02
moving along with whitespace
2009-12-28 23:08:02 -05:00
Jeremy Ashkenas
ddd52a1845
first draft of kamatsu's rewrite rules -- finally got whitespace to be flexible enough, I think.
2009-12-28 21:07:47 -05:00
Jeremy Ashkenas
50bdd2668c
got lexer balancing parens, indent/outdents, brackets, and curlies
2009-12-28 21:02:40 -05:00
Jeremy Ashkenas
bb84a982ce
merging in master
2009-12-28 20:06:23 -05:00
Jeremy Ashkenas
c84bb0c875
fixing relative path for execution tests
2009-12-28 16:23:48 -05:00
Jeremy Ashkenas
a186e47e2c
stop shifting args
2009-12-28 16:20:11 -05:00
Jeremy Ashkenas
41f3d54f4a
rebuilding narwhal libs
2009-12-28 16:10:56 -05:00
Jeremy Ashkenas
9e47f6bd58
merging in tlrobinson's fix for package.json
2009-12-28 16:09:14 -05:00
Jeremy Ashkenas
845c8cba3b
removing broken accidental commit
2009-12-28 09:02:55 -08:00
tlrobinson
a722b42eed
Add package on command line in case it's not installed in a Narwhal packages path.
2009-12-28 01:49:07 -08:00
tlrobinson
78e08f316d
Merge branch 'master' of git://github.com/jashkenas/coffee-script
2009-12-28 01:36:23 -08:00
tlrobinson
55616cf3b8
Fixed Narwhal integration. Cleaned up module organization, etc.
2009-12-28 01:16:57 -08:00
Jeremy Ashkenas
aa45456d7d
part of the way to supporting multiline array comprehensions -- the grammar and parsing is there -- the code generation is tricky
2009-12-27 21:50:02 -08:00
Jeremy Ashkenas
ac00a19514
CoffeeScript 0.1.6 -- bugfixes
2009-12-27 12:49:11 -08:00
Jeremy Ashkenas
7ae8687a3e
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
2009-12-27 12:43:05 -08:00
Jeremy Ashkenas
3ee4e98ccc
more underscore and bugfix edits to code generation
2009-12-26 22:24:21 -08:00
Jeremy Ashkenas
d7dd18b476
more underscore, and removing custom_assign and return from conditional compilation
2009-12-26 21:55:56 -08:00
Jeremy Ashkenas
097bede5c8
coffeescript 0.1.5, just for kicks
2009-12-26 21:25:37 -08:00
Jeremy Ashkenas
eeef8d3612
got negative ranges working with (much, much) uglier compiled code
2009-12-26 20:35:43 -08:00
Jeremy Ashkenas
b4250c0f02
that's it for now for significant whitespace -- I really just can't make flexible enough
2009-12-26 19:29:59 -08:00
Jeremy Ashkenas
cc0c92d20d
smarter but uglier lexer -- now handles most significant whitespace cases. Clean it up though... (newlines after outdents)
2009-12-26 13:22:53 -08:00
Jeremy Ashkenas
694833dbd0
removing no_paren -- it was optimizing away order of operations
2009-12-26 11:55:34 -08:00
Jeremy Ashkenas
fde9852090
removing no_paren -- can cause order of operations errors
2009-12-26 11:10:59 -08:00
Jeremy Ashkenas
191875a85b
got a lexer working along the lines of what kamatsu proposes
2009-12-26 10:59:47 -08:00
Jeremy Ashkenas
556f8cb68a
little more progress on whitespace
2009-12-26 10:49:11 -08:00
Jeremy Ashkenas
5bed5646be
merging in master
2009-12-26 09:59:06 -08:00
Jeremy Ashkenas
08dddb27a0
adding newline escaping, with tests
2009-12-26 09:29:03 -08:00
Jeremy Ashkenas
3c67d54bbe
changed bin/coffee-script to bin/coffee
2009-12-26 08:57:13 -08:00