Simon Lydell
28c07d30cb
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 .
2015-01-15 17:47:07 +01:00
Simon Lydell
a63009fccb
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.
2015-01-10 02:31:56 +01:00
alubbe
dd5da7f5f2
implemented proper precedence for 'yield'
2014-10-13 03:32:02 +02:00
Andreas Lubbe
437b9ed65c
added 'yield return'
2014-09-06 15:40:53 +02:00
Andreas Lubbe
c72556619f
added 'yield from'
2014-09-06 13:53:21 +02:00
Andreas Lubbe
565d78f00b
removed support for '->*" and '=>*'
2014-09-06 13:38:04 +02:00
Andreas Lubbe
f375394381
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
2014-01-25 19:37:35 -08:00
Demian Ferreiro
2b4421fca1
Merge branch 'master' into more-math-operators
...
Conflicts:
lib/coffee-script/grammar.js
lib/coffee-script/lexer.js
lib/coffee-script/nodes.js
lib/coffee-script/parser.js
test/regexps.coffee
2014-01-24 15:40:28 -03:00
xixixao
369e0545c0
Added expansion to destructuring
2014-01-24 16:00:34 +00:00
Andreas Lubbe
dab4ae9416
'->*' and '=>*' now produce generators
2013-12-19 18:08:25 -08:00
xixixao
d7862647d9
Fix multiple postfix conditionals
2013-12-17 03:31:19 +01:00
Marc Häfner
25c6001a6c
Speed up updateLocationDataIfMissing.
...
* Avoid excessive search for missing `locationData`
* Fix `locationData` for `ELSE IF`.
2013-06-21 02:47:29 +02:00
Marc Häfner
4fd5e9a3ab
Better handling of initial indent at file start.
...
* Detect initial indentation before the first token and enforce it.
* Don't add `INDENT` token (or the matching `OUTDENT, TERMINATOR`).
2013-06-14 00:28:45 +02:00
Marc Häfner
cf07fcb4b1
#2900 -- parameter-less catch clause.
...
Plus some minor cleanup after f8c6b494aa
2013-04-12 17:50:45 +02:00
Demian Ferreiro
08b59aef8a
Make power operator have higher precedence than unary operators: +, -, ~, !
2013-03-25 00:05:04 -03:00
Demian Ferreiro
e237abff84
Merge branch 'power-operator' of git://github.com/charliesome/coffee-script into more-math-operators
...
Conflicts:
src/nodes.coffee
test/operators.coffee
2013-03-24 22:47:46 -03:00
Jeremy Ashkenas
dbb99f31a7
Reverting #2490
2013-03-10 07:21:00 +08:00
Jeremy Ashkenas
c53df12ec1
disallow multiple else blocks in if/guard syntax
2013-03-09 15:44:45 +08:00
Jeremy Ashkenas
13fae12f69
Fixes #2490 -- adding guard-style if blocks
2013-03-09 10:40:37 +08:00
Jeremy Ashkenas
b3452c1276
Fixes #2508 -- existential access of the prototype.
2013-03-04 22:07:47 +13:00
Demian Ferreiro
bf70b4660e
Revert #2599
2013-02-28 10:37:30 -03:00
Jeremy Ashkenas
ac9d0e17e4
Merging in location data in the AST. Yee-hah.
2013-02-25 17:51:05 +13:00
Jason Walton
e1a2e11de4
Fix merge problem, and rebuild parser.js
2013-02-21 20:17:06 -05:00
Jeremy Ashkenas
fa1ffa66d3
Fixes #2359 -- tweak grammar to use new name
2013-02-14 16:34:32 +13:00
Jeremy Ashkenas
78891a0ccc
Merging in @epedemian's fix for #2359 -- disallow other-typed constructors
2013-02-01 22:30:22 +11:00
Jez Ng
847ab4d18e
Parse compound assignment followed by a terminator.
...
Closes #2532 .
2012-11-27 20:11:01 -05:00
Demian Ferreiro
52b0f76eb2
Prevent constructors from returning values
2012-10-28 08:55:48 -03:00
Jeremy Ashkenas
0ba628159f
Fixes #2580 -- Try/Catch is allowed to destructure the error object.
2012-10-23 17:57:22 -04:00
Michael Ficarra
caf3da2f66
lexer/parser: split out null and undefined from BOOL token
...
also made explicit AST nodes `Bool`, `Null`, and `Undefined`
2012-05-08 16:14:28 -04:00
Jeremy Ashkenas
87257ea6b3
Fixes #2258 -- allow parameter lists in the vertical style.
2012-04-24 16:56:39 -04:00
Jeremy Ashkenas
4fc9a345bb
Fixes #2274 -- allow @variables as loop variables
2012-04-24 12:21:47 -04:00
clutchski
2e06316e31
Allowing both end-points of slices to be implicit.
2011-12-20 19:21:26 -05:00
Jeremy Ashkenas
686ef9e7f4
Fixes #1838
2011-12-14 18:31:20 -05:00
Jeremy Ashkenas
35dc56d785
making debugger an expression.
2011-11-25 08:35:20 -05:00
Jeremy Ashkenas
2c92904109
Reverting conclusion of #1001 -- Throw should be able to be used as part of an expression.
2011-11-24 09:36:16 -05:00
Gerald Lewis
bde1c6282e
rebuilt jison parser for 1840
2011-11-14 11:36:58 -05:00
Gerald Lewis
c9fd0659c2
revised patch for #1234 ; consolidated Value#push and Value#concat into Value#add; removed unnecessary INDEX_PROTO
2011-08-12 13:38:34 -04:00
Gerald Lewis
29a44b84d5
fixes #1234 ... :: now creates an intermediary "prototype" Access node before any additional property accesses
2011-08-10 22:01:47 -04:00
Michael Ficarra
818216374c
Merge branch 'restructuring' of github.com:jashkenas/coffee-script
2011-08-08 13:21:58 -04:00
gfxmonk
ab17f41652
Moved src/*.coffee under src/coffee-script/ so that lib can be added to $NODE_PATH and only expose the top-level coffee-script namespace. Fixes #1246
2011-07-05 21:58:04 +10:00