Jeremy Ashkenas
117204a784
Revert "Issue #619 . 'new' operator misbehavior."
...
This reverts commit e7834de929 .
2010-08-21 19:16:02 -04:00
Jeremy Ashkenas
e7834de929
Issue #619 . 'new' operator misbehavior.
2010-08-21 18:54:24 -04:00
Stan Angeloff
01cd5476a0
'-r' should work with $NODE_PATH as well (where previously it was an absolute/relative path)
2010-08-16 17:36:55 +03:00
Jeremy Ashkenas
197f576cab
Merged in Stan's patch that allows -r scripts to modify input and output.
2010-08-15 08:32:09 -04:00
Jeremy Ashkenas
0b8facc66f
Merge branch 'master' of git://github.com/StanAngeloff/coffee-script
2010-08-15 08:20:50 -04:00
Jeremy Ashkenas
975b82f09b
Issue #609 . Slightly faster implementation of ||= and &&=
2010-08-14 18:02:07 -04:00
Jeremy Ashkenas
9894eeb8e9
Improving double-parentheses suppression. Issue #587
2010-08-14 17:43:58 -04:00
Jeremy Ashkenas
6555d86328
Adding a jsl.conf configuration file for JavaScript lint, and switching to == null for soaks, accordingly.
2010-08-14 16:02:01 -04:00
Stan Angeloff
d30c8b321c
Allow required files to change the input and output of compiled files.
2010-08-13 01:28:38 +03:00
Jeremy Ashkenas
a749d43897
Use fs.realpathSync instead of something hacky.
2010-08-08 10:05:44 -04:00
Jeremy Ashkenas
08506f160d
Adding CoffeeScript as a globally-available object, when invoked from the coffee command-line, only.
2010-08-08 09:54:45 -04:00
Jeremy Ashkenas
b902377304
Fixing Issue #589 . Compound assignment to an operation should have lower precedence.
2010-08-08 00:07:00 -04:00
Jeremy Ashkenas
1c903450c8
Merging in Stan's patch for a --require flag that allows you to hook into CoffeeScript compiler events for on 'compile', 'success', and 'failure' ... a better way to extend the language or do growlnotify stuff. Issue #590
2010-08-07 23:33:35 -04:00
Stan Angeloff
b1b78dca47
Add command-line compiler hooks. To invoke, pass a file after -r and listen for any of these events: 'compile', 'success' and 'exception'. Example:
...
coffee -e -r ./snarl 'Hello!'
Contents of 'snarl.coffee' in the working directory:
http = require 'http'
CoffeeScript.on 'exception', (err) ->
client = http.createClient 9889, 'localhost'
request = client.request 'GET', '/?d={"action":1,"applicationName":"CoffeeScript","title":' + JSON.stringify(err.message) + ',"description":' + JSON.stringify(err.stack) + ',"priority":3}'
request.end()
err.handled = yes
To examine arguments available for each event (for debugging and getting started), use `puts JSON.stringify arguments`.
See http://nodejs.org/api.html#modules-309 and NODE_PATH for more details on how -r looks for files.
2010-08-07 20:24:37 +03:00
Jeremy Ashkenas
9df3e6a538
first step towards requiring #{ ... } interpolation -- removing naked interps from the compiler.
2010-08-07 08:02:16 -04:00
Jeremy Ashkenas
b1f7d5e33b
compile empty coffee files to js anyway.
2010-08-04 23:42:46 -04:00
Jeremy Ashkenas
5f2326e911
fixing Issue #569 . Compiling empty source files to disk with --no-wrap on.
2010-08-04 21:36:03 -04:00
Jeremy Ashkenas
071b527b66
Issue #559 , renaming {source} option to {fileName}, on CoffeeScript.compile
2010-07-30 20:37:12 -04:00
Jeremy Ashkenas
dc1288d319
slightly optimizing return values of AssignNodes. Issue #539
2010-07-24 12:27:11 -07:00
Jeremy Ashkenas
3b6f020f8a
Making the spacing of symbols on function declaration consistent. No-space when single-line. Spaced when block. (StanAngeloff)
2010-07-24 08:31:43 -07:00
Jeremy Ashkenas
d017a8f9f7
Moving from '.addListener' to '.on' for Node v0.1.101
2010-07-18 07:54:44 -04:00
Jeremy Ashkenas
cc827b139d
Turning --compile on when --output is set, because it's probably what was intended.
2010-07-13 21:04:32 -04:00
Jeremy Ashkenas
2a7a26482a
fixing optparse to behave nicely in the presence of hashbangs -- stop parsing after the first non-option argument, and pass the rest along -- and adding an OptionParser test.
2010-07-11 09:57:42 -04:00
Jeremy Ashkenas
3d6cdfa636
making it possible to pass in command-line arguments to a hash-banged coffee script. Ticket #473
2010-07-10 15:36:54 -04:00
Jeremy Ashkenas
358edfb21f
fixing return node squashing the possiblity of a ternary, when there should be one. Issue #475
2010-07-06 23:04:35 -04:00
Jeremy Ashkenas
1f7af35368
getting ready for a 0.7.0. cleanups and doc revisions, not quite there yet.
2010-06-28 00:19:58 -04:00
Jeremy Ashkenas
08ab4abd43
removing obvious redundant parentheses.
2010-06-27 23:55:18 -04:00
Jeremy Ashkenas
ec570c46bf
Big commit. First draft of stripping comments from generated JS output. Issue #41
2010-06-27 12:59:54 -04:00
Jeremy Ashkenas
b0a45e5b93
Ticket #423 . When functions are generated within comprehensions ... the comprehensions should close over the element instead of sharing it.
2010-06-13 21:21:30 -04:00
Jeremy Ashkenas
4ecb1bb2ed
switching to 'Compiled' messages after the code has finished compiling on --watch ...
2010-06-13 14:21:02 -04:00
Jeremy Ashkenas
e14f4c5db1
First draft of switching the CoffeeScript Compiler over to camelCase. Pour one on the ground for underscores...
2010-06-12 19:05:13 -04:00
Jeremy Ashkenas
a133e018cc
Making the REPL the default behaviour of 'coffee', when called with no arguments, a-la Node and Python.
2010-06-12 11:09:30 -04:00
Jeremy Ashkenas
59de6b505a
ahh, finally. switched up our Jison configuration to provide better syntax errors. Now you get the unexpected token, instead of the expected one.
2010-06-01 20:21:12 -04:00
Jeremy Ashkenas
300c711af1
enabling compilation of non-.coffee-extension files passed directly to the coffee command (Issue #391 )
2010-05-31 15:36:41 -04:00
Jeremy Ashkenas
a8d4c3a567
sprinkling toString() throughout, for Node.js 0.1.95 compatibility.
2010-05-15 00:34:14 -04:00
Jeremy Ashkenas
dfb3a13246
Fixed lingering CoffeeScript Compiler running live in Internet Explorer bugs. Implemented helpers.index_of and removed named functions. Ticket #366
2010-05-14 23:40:04 -04:00
Jeremy Ashkenas
d64b8fd9d8
merged in Trevor Burnham's recursive coffee compilation, with some adjustments...
2010-05-04 23:22:28 -04:00
Trevor Burnham
fa8cc7976a
Added recursive compilation and monitoring option to coffee command
2010-05-03 17:38:59 -04:00
Jeremy Ashkenas
2d1abd099d
rewriting the Lexer, CommandLine, Nodes, and Rewriter to take advantage of the new DRY object pattern matching.
2010-04-25 22:29:43 -04:00
Jeremy Ashkenas
835ecac8db
simplifying some unecessary interpolated expressions into interpolated values.
2010-04-11 16:57:53 -04:00
Jeremy Ashkenas
8317960f81
Battery of patches for compatibility with Node v0.1.90
2010-04-10 18:05:35 -04:00
Jeremy Ashkenas
065bf54094
generated closures should only call() or apply() when necessary.
2010-04-10 14:40:05 -04:00
Chris Lloyd
19ed63129e
Interpolated strings are expressions.
2010-04-04 17:05:52 +10:00
Jeremy Ashkenas
864275f07e
removing __range, and all the slice behavior it enabled. If you can't do array[-1], then you shouldn't be able to do array[0..-1] -- it's just too inconsistent.
2010-03-30 20:06:44 -04:00
matehat
ca9e45e8af
Removed the __slice method, in favor of the native array slice method
2010-03-30 17:57:23 -04:00
matehat
97096696a2
Put back every utility functions on the global scope, automatically prefixed with __ and set them dynamically as reserved on the lexer.
2010-03-30 16:48:43 -04:00
matehat
da43c70488
Merged in StanAngeloff excellent slice branch, applying recent factoring of utility functions
2010-03-30 15:43:30 -04:00
Stan Angeloff
7d1fbeb708
Re-compiling the core using the new __slice and __splice functions.
2010-03-30 14:32:37 -04:00
Jeremy Ashkenas
7de5253318
removing unused reserved variable 'source var' from range comprehensions
2010-03-27 16:04:47 -04:00
Jeremy Ashkenas
80230414a2
merging in gfxmonk's major refactor to the way that returns are pushed down into the interior of expressions
2010-03-21 11:28:05 -04:00