Jason Walton
ea86e3e7b1
Optionally allow replacement of existing mappings in SourceMap#addMapping().
2013-03-01 10:18:37 -05:00
Jason Walton
844549954a
Minor API clean up, and make it so sourcemaps are pretty-printed to the .map file.
2013-03-01 10:12:10 -05:00
Jason Walton
51fe417d58
Fix generated file name in v3 source map
2013-03-01 08:56:17 -05:00
Jason Walton
0e718f0968
Merge branch 'sourcemaps' of https://github.com/surjikal/coffee-script into sourcemaps
2013-03-01 08:47:42 -05:00
Jason Walton
0d6d479d77
Merge branch 'master' into sourcemaps
...
Conflicts:
lib/coffee-script/coffee-script.js
lib/coffee-script/nodes.js
src/nodes.coffee
2013-03-01 08:47:16 -05:00
Nicolas Porter
88e02322e5
Fixed key name in source map, added coffee file to map sources
...
These are the modifications I had to do in order to get source maps working
in 27.0.1425.2 (Official Build 185250) canary. I haven't tested other
browsers.
I first looked at the V3 spec and a few examples, and I saw that the
`source` key of the source map should be called `sources`.
After doing the `source` to `sources` change, the coffee source and for
some odd reason the javascript file would not show up in the browser
dev tools (it was being fetched but not evaluated).
To fix this, I had to add the coffee source to the `sources` list in the
source map file.
2013-03-01 05:58:26 -05:00
Jeremy Ashkenas
5dea70b82e
Fixes #2721 -- show error message for naked super
2013-03-01 13:25:49 +13:00
Jeremy Ashkenas
6b79af2b7c
Fixes #2721 , super outside of classes with extends for instance methods.
2013-03-01 13:17:07 +13:00
Jeremy Ashkenas
68718b6938
Moving path dependency back into 'command'
2013-03-01 12:50:42 +13:00
Jeremy Ashkenas
d70d71f574
Merging in .coffee.md support alongside .litcoffee ... I think we'll keep .litcoffee as the canonical, however.
2013-03-01 12:46:40 +13:00
Jeremy Ashkenas
f33517368e
Removing duplicate 'CATCH'
2013-03-01 12:38:41 +13:00
Jeremy Ashkenas
a48ca260bd
Merge pull request #2746 from troels/implicit-calls-with-overhang-on-first-argument-only-on-implicit-object
...
Disallow implicit calls in cases like:
2013-02-28 14:55:45 -08:00
Troels Nielsen
71e04d9839
Disallow implicit calls in cases like:
...
f
a
and only allow cases like:
f
a: 1
2013-02-28 23:20:42 +01:00
Jeremy Ashkenas
2970d59395
Merge pull request #2743 from epidemian/revert-2599
...
Revert #2599
2013-02-28 13:53:34 -08:00
Jason Walton
7073d18f23
Add source map support
2013-02-28 15:51:29 -05:00
Jeremy Ashkenas
23d8cd6c2a
Merge branch 'master' of https://github.com/jashkenas/coffee-script
2013-03-01 07:46:04 +13:00
Jeremy Ashkenas
e70dd156b0
Fixing heredocs in literate coffeescript
2013-03-01 07:42:12 +13:00
Demian Ferreiro
4469d062e1
Add a couple of tests to document the behaviour of other typed constructors
2013-02-28 10:37:47 -03:00
Demian Ferreiro
bf70b4660e
Revert #2599
2013-02-28 10:37:30 -03:00
Jeremy Ashkenas
c0e07013e8
Merge pull request #2741 from troels/implicit-call-try-catch-finally
...
Fix implicit calls with try/catch/finally as arguments
2013-02-28 03:00:49 -08:00
Jeremy Ashkenas
c6f30935a8
(Aside: For historical reasons we do make the filename extension optional, which is a deeply regrettable accident of history that I would not repeat, given the chance.)
2013-02-28 23:54:19 +13:00
Troels Nielsen
cb187fd900
Fix implicit calls with try/catch/finally as arguments
2013-02-28 11:53:04 +01:00
Jeremy Ashkenas
3f23be2854
Merge pull request #2718 from sbp/sbp-literate
...
Add support for text/literate-coffeescript in the browser
2013-02-28 02:47:43 -08:00
Sean B. Palmer
881ae5528d
Add support for text/literate-coffeescript in the browser
2013-02-28 10:15:20 +00:00
Michael Smith
1a8354482a
Modify extension handling to allow for .coffee.md
...
Move filename processing to a `parseFileName` function in
helpers.coffee.
Map `.coffee.md` as a Literate CoffeeScript extension.
Also, make .litcoffee and .coffee.md files executable without their file
extension - eg. `coffee test` would work for a file called
`test.litcoffee`.
2013-02-27 22:49:24 -08:00
Jeremy Ashkenas
32eb1bf58f
Merge pull request #2740 from mintplant/hoist-build
...
Hoist build function to top level of Cakefile
2013-02-27 22:27:01 -08:00
Michael Smith
b2e17c3045
Hoist build function to top level of Cakefile
2013-02-27 22:21:10 -08:00
Jeremy Ashkenas
ac2c5f0201
Merge pull request #2712 from troels/implicit-object-implicit-call-stuff
...
Implicit object/implicit call interaction handling
2013-02-27 17:32:31 -08:00
Troels Nielsen
1666716c31
Improve the handling of implicit object and implicit call combinations
...
by handling them together.
2013-02-27 08:15:38 +01:00
Demian Ferreiro
5115fcb162
Add CompilationError.fromLocationData
2013-02-26 23:03:33 -03:00
Jason Walton
541ab8334d
Compile to an array of CodeFragments instead of to a giant string.
2013-02-26 13:34:27 -05:00
Demian Ferreiro
1db89d1589
Optimized repeat and its tests
2013-02-26 14:41:01 -03:00
Michael Ficarra
965237e0da
Merge pull request #2725 from mintplant/repl-fix
...
Fix REPL crashing on execution error
2013-02-26 08:20:36 -08:00
Michael Smith
5698e425fd
Use blank line regex from Redux
2013-02-26 08:08:47 -08:00
Demian Ferreiro
fbc8417263
Fix failing parser error message test
2013-02-26 05:55:09 -03:00
Michael Smith
ff1ddd0284
Fix repl handling of blank line
...
Since the move to the nodeREPL package, input lines to be evaluated are
now wrapped in parentheses; that is:
'foo'
would become:
('foo'
)
The old way of detecting empty lines was to see if the input string was
either totally empty, or whitespace-only. The addition of these
parentheses breaks that.
In order to fix this, we simply tweak the regex a little to ignore these
added parentheses if they're present. As an added bonus, the regex
should match empty inputs even if they aren't.
This also makes the "empty command evaluates to undefined" test pass,
for the right reasons (i.e. not because of the broken error behavior
from before).
2013-02-25 22:09:50 -08:00
Michael Smith
deaa31dca5
Prevent repl from crashing on error [ Fixes #2716 ]
...
Move execution of the compiled code inside the try/catch block:
try
js = CoffeeScript.compile "_=(#{input}\n)", {filename, bare: yes}
catch err
cb err
> cb null, vm.runInContext(js, context, filename)
try
js = CoffeeScript.compile "_=(#{input}\n)", {filename, bare: yes}
> cb null, vm.runInContext(js, context, filename)
catch err
cb err
2013-02-25 22:08:01 -08:00
Demian Ferreiro
44e3a76881
Add some error formatting tests
...
Thanks to them i discovered that the parser errors where indicating the wrong token ¬¬
2013-02-26 01:30:23 -03:00
Demian Ferreiro
f2efada0d4
Improved compiler error messages
2013-02-25 23:37:30 -03:00
Demian Ferreiro
5f00d6478a
Remove redundant filename in error message
2013-02-25 19:20:37 -03:00
Michael Ficarra
8b0dd9d224
Merge pull request #2719 from epidemian/minor-embellishments
...
Minor embellishments
2013-02-25 10:35:25 -08:00
Demian Ferreiro
7e5f1b14a3
Pass 0-based indexes to CompilerError
2013-02-25 15:12:25 -03:00
Demian Ferreiro
caacd892cc
Improved parser error messages
2013-02-25 15:09:42 -03:00
Demian Ferreiro
25091fb2a0
Improved lexer error messages
2013-02-25 14:41:34 -03:00
Demian Ferreiro
dcdfe9bc34
Fix indentation on test
2013-02-25 14:15:24 -03:00
Demian Ferreiro
f609036bee
Remove unnecessary returns and use default parameters
2013-02-25 10:44:56 -03:00
Jeremy Ashkenas
c39723c053
expanding literate explanation
2013-02-25 22:29:42 +13:00
Jeremy Ashkenas
d2f400944d
Adding a negative array loop example to the docs
2013-02-25 22:27:06 +13:00
Jeremy Ashkenas
673125e64a
Merge branch 'master' into gh-pages
2013-02-25 21:23:24 +13:00
Jeremy Ashkenas
e1592890cb
Retina-ifying the CoffeeScript logo
2013-02-25 21:23:08 +13:00