Jeremy Ashkenas
|
ad5b5fa458
|
fixing the regex lexer to make it less agressive when we know it can't possibly be a regex
|
2010-01-01 09:49:18 -05:00 |
|
Jeremy Ashkenas
|
41056ca2bd
|
fix for multiple splats in a function call
|
2009-12-31 20:02:15 -05:00 |
|
Jeremy Ashkenas
|
409283a30f
|
adding splats as arguments to function calls
|
2009-12-31 19:52:13 -05:00 |
|
Jeremy Ashkenas
|
26c89cef06
|
reserving variables for splats the regular way, not through a custom 'var' declaration
|
2009-12-31 18:03:39 -05:00 |
|
Jeremy Ashkenas
|
1d2bb3b2be
|
adding splats to function definitions
|
2009-12-31 17:50:12 -05:00 |
|
Jeremy Ashkenas
|
f299972713
|
expressions nested in expressions made for some indentation issues -- statements are now responsible for their own leading indentation
|
2009-12-31 16:50:46 -05:00 |
|
Jeremy Ashkenas
|
7ec91a1ee5
|
enabling multi-line array and object comprehensions
|
2009-12-31 16:09:27 -05:00 |
|
Jeremy Ashkenas
|
07d0044718
|
using push for comprehension results so that it works with object keys, and adding a test for object comprehensions
|
2009-12-31 15:03:32 -05:00 |
|
Jeremy Ashkenas
|
00538bd62c
|
adding weepy's suggestion to use (for .. in) for array comprehensions, which means that they're now object comprehensions as well
|
2009-12-31 14:52:14 -05:00 |
|
Jeremy Ashkenas
|
4e8a12d70d
|
done commenting the rewriter
|
2009-12-31 13:45:07 -05:00 |
|
Jeremy Ashkenas
|
edf1fc769f
|
detailed scan_tokens so that the calling function can indicate the number of spaces to move forward (or backward) in the token stream
|
2009-12-31 13:43:24 -05:00 |
|
Jeremy Ashkenas
|
2231d67cef
|
making assignment token detection a regex like all the others
|
2009-12-31 13:26:38 -05:00 |
|
Jeremy Ashkenas
|
a376e7f4a3
|
pulled out all token-stream-rewriting logic into the CoffeeScript::Rewriter -- let the lexer be simpleminded
|
2009-12-31 13:22:33 -05:00 |
|
Jeremy Ashkenas
|
e481a39a0d
|
making all functions named functions, if children of an immediate assignment
|
2009-12-30 23:13:22 -05:00 |
|
Jeremy Ashkenas
|
8762162dff
|
adding proper auto-newline escaping
|
2009-12-30 22:49:25 -05:00 |
|
Jeremy Ashkenas
|
a6539a030c
|
allowing any manner of indentation in the comments, by adjusting them in the lexer
|
2009-12-30 22:24:40 -05:00 |
|
Jeremy Ashkenas
|
942572d081
|
don't print the confusing indentation numbers when raising ParseErrors for indentation
|
2009-12-30 21:57:03 -05:00 |
|
Jeremy Ashkenas
|
dba8439425
|
the underscore example parses now -- added line number information to parenthetical nodes
|
2009-12-30 21:44:51 -05:00 |
|
Jeremy Ashkenas
|
774e3d3e31
|
moving the newline escaping detection up higher so indents don't overrule it
|
2009-12-30 21:41:01 -05:00 |
|
Jeremy Ashkenas
|
cae0b1a038
|
lex indents with higher precedence than comments
|
2009-12-30 21:20:30 -05:00 |
|
Jeremy Ashkenas
|
fd83759ef4
|
more fiddling with the lexer -- the indentation is super fragile
|
2009-12-30 21:11:54 -05:00 |
|
Jeremy Ashkenas
|
49714656e1
|
rolling back MULTI_DENT regex
|
2009-12-30 20:41:32 -05:00 |
|
Jeremy Ashkenas
|
d43d491561
|
regex cleanup -- eliminating some lookahead because Ruby regexps blow chunks (stackoverflows) when you look (ahead) at them funny.
|
2009-12-30 20:36:47 -05:00 |
|
Jeremy Ashkenas
|
c8711b419e
|
fixed up the comment/assignment interleaving in nodes.rb
|
2009-12-30 20:24:24 -05:00 |
|
Jeremy Ashkenas
|
5c7b77aa4d
|
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
|
2009-12-30 20:12:30 -05:00 |
|
Jeremy Ashkenas
|
dc821f2e4c
|
be more vigorous about removing mid-expression newlines, 'when' closes implicit blocks, a better comment-detecting regex lexer that doesn't eat outdents
|
2009-12-30 19:26:37 -05:00 |
|
Jeremy Ashkenas
|
cd68f02981
|
big milestone. examples/code.coffee now compiles correctly under the new whitespace regime
|
2009-12-30 18:59:33 -05:00 |
|
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 |
|