Andreas Lubbe
dafc7bdea5
added 'yield' to the unary keywords
2013-11-15 22:16:28 +01:00
Andreas Lubbe
f51cbd7117
removed 'yield' from the reserved keywords
2013-11-15 22:15:31 +01:00
Marc Häfner
592aa33577
Fixes #2367 -- super in for-loop
2013-11-15 06:35:04 +01:00
Marc Häfner
544c99a9ad
Fix error location for illegal pure statements
2013-11-15 05:37:34 +01:00
Marc Häfner
aea0f2533b
Fixes #3232 -- Tag all class properties static
...
(and remove duplicate `context` assigment)
2013-11-15 03:44:26 +01:00
Marc Häfner
138c25fe5f
Cleanup and extend METHOD_DEF
...
* Fixes #2949 : Detect reserved names (not only for instance methods)
* Don't assign names which might result in incorrect `super` calls
2013-11-12 16:53:09 +01:00
Marc Häfner
96ae98fade
Fixes #3087 -- Use fs.*Sync for CLI compilation
...
* Make `compilePath` synchronous
* Remove unused variable
2013-11-10 08:36:29 +01:00
xixixao
0dada3dd27
Remove unnecessary type conversions to Number
2013-11-10 00:13:52 +00:00
xixixao
849c8e8ef4
Remove unnecessary existential check
2013-11-10 00:13:14 +00:00
Marc Häfner
d41d87a874
Avoid unnecessary wrapping of some bound functions
2013-11-03 03:14:13 +01:00
Marc Häfner
5d13d14de9
Closes #3008 -- Fix scope of constructor reference
...
* Make scope of `Code` nodes accessible (prior to `compileNode`)
* Use correct scope for reference of external constructor.
* Remove unreachable code.
2013-11-01 01:13:10 +01:00
Marc Häfner
1df8abf1cb
Refactor closure compilation
...
* Break up `Closure` and merge `Closure.wrap` into `Base.compileClosure`
* Construct class closure directly in `Class.compileNode`
* Reuse `isLiteralArguments` in `Range.compileArray`
* Move all helpers to bottom of file
* Add test for #3063
2013-10-31 23:25:11 +01:00
Marc Häfner
091bc56a96
Code cleanup in Class
...
* Don't insert unnecessary `_ref` (in the wrong scope)
* Improve code prettiness. (Reverts most of 903e9c99 )
2013-10-29 00:01:20 +01:00
Marc Häfner
9ba1d41ec8
Fix: __extends helper above directive prologue
2013-10-26 06:54:54 +02:00
Marc Häfner
0d662c3ad2
Missing parentheses
2013-10-24 00:43:29 +02:00
Marc Häfner
fa76e2dd21
Escapable linebreaks in heregexes
2013-10-24 00:36:46 +02:00
Marc Häfner
91ac3fa031
Escaped whitespace and slashes in Heregexes
...
* Resolves #3059 : Don't remove escaped whitespace.
* Fixes #2238 : Prevent escaping slashes that are already escaped.
* Fix detection of end of heregex with escaped slashes.
2013-10-22 18:08:17 +02:00
Jeremy Ashkenas
c22707cd53
Fixes #2941 -- don't destroy extensionless filenames for --join
2013-10-20 19:09:55 -03:00
Jeremy Ashkenas
351c875576
merged in stricter noncallables
2013-10-20 18:49:30 -03:00
Jeremy Ashkenas
35b64d7f18
Merge pull request #3211 from marchaefner/issue2181
...
Fix compilation for conditional assignment
2013-10-20 14:16:38 -07:00
Jeremy Ashkenas
db87d817e8
Merge pull request #3012 from imcotton/parallel-loading
...
Script loading parallelized in browser
2013-10-20 14:10:40 -07:00
Marc Häfner
4cc2c305a4
Fixes #2181 -- conditional assignment as subexpression
...
* Parenthesize compilation of `||=` and `&&=` (when needed).
* Fix variable caching for `?=`
2013-10-20 22:59:01 +02:00
Jeremy Ashkenas
a5513c45d0
Fixes #3047 -- Fixes module.paths when running directly with no explicit passed-in files.
2013-10-20 17:50:13 -03:00
Jeremy Ashkenas
c820e0241e
Fixes #3053 - error for mismatched own/for-in without an index.
2013-10-20 17:40:50 -03:00
Jeremy Ashkenas
eb2ac2c64d
Fixes #3063 -- wait a moment so that an error can be raised.
2013-10-20 17:04:52 -03:00
Jeremy Ashkenas
59cf19fd1c
Fixes #3072 -- tweak process.argv to match when running REPL
2013-10-20 16:53:08 -03:00
Jeremy Ashkenas
d5a25d138d
Fixes #3089 -- don't mutate options passed in to compile()
2013-10-20 16:21:06 -03:00
Jeremy Ashkenas
a7ecd80c92
Merge pull request #3096 from marchaefner/issue2994
...
Disallow single-line `IF expr ELSE` without `THEN`
2013-10-20 12:13:39 -07:00
Jeremy Ashkenas
465cffc675
Merge pull request #3113 from mklement0/make-repl-use-global-context
...
Make the REPL *CLI* use the global context to be consistent with the node REPL *CLI*.
2013-10-20 09:17:07 -07:00
Jeremy Ashkenas
302a46d093
Merge pull request #3132 from caitp/issue-3132
...
Format block-comments better
2013-10-20 09:08:40 -07:00
Jeremy Ashkenas
392767a04e
Fixes #3143 -- Potential memory leaks caused by use of fat arrow next to other (non-fat-arrow-using) long-lived closures.
2013-10-20 12:53:18 -03:00
Jeremy Ashkenas
928f949761
Fixes #3160 -- a missing bit of locationData
2013-10-20 12:15:15 -03:00
Jeremy Ashkenas
2b03fa9077
Fixes #3166 -- add a (simpler) flag to suppress the generated header.
2013-10-20 12:03:37 -03:00
Jeremy Ashkenas
cfdb774da9
CoffeeScript REPL should be able to require coffeescript files.
2013-10-20 11:22:23 -03:00
Jeremy Ashkenas
b173a377a6
Fixes #3208 . You now have to require 'coffee-script/extensions' in order to be able to auto-require CoffeeScript files.
2013-10-20 11:08:13 -03:00
Mal Graty
a8e4b78803
Fixes #3186
2013-09-29 15:28:58 +01:00
a3gis
89ef3d4117
accept all format of numbers in ranges
2013-09-24 19:15:31 +01:00
Michael Klement
fceff1729c
Make the REPL *CLI* use the global context so as to be consistent with the node REPL CLI.
...
Make the REPL *CLI* use the global context so as to (a) be consistent
with the `node` REPL CLI and, therefore, (b) make packages that modify
native prototypes (such as 'colors' and 'sugar') work as expected.
Note that, by contrast, programmatic use (`require 'repl'`) will
continue to default to a NON-global context - again, consistent with
node's behavior.
2013-09-03 18:19:43 -04:00
Michael Klement
ae4535d639
Fix: support for consumers of the REPL *module* being able to opt into using the global context via option .useGlobal.
...
Note that, at least for now, CoffeeScript's own REPL *CLI* still uses a
non-global context, rendering modules such as `color`, which attempt to
modify the prototypes of JavaScript primitives, ineffective. By
contrast, node's own CLI does use the global context.
2013-09-03 16:41:27 -04:00
a3gis
c5120c7980
fix exit code when using --nodejs option
2013-09-02 16:11:22 -05:00
Caitlin Potter
1b7491d63d
Fixes #3132 - Improve rendering of block-comments
2013-08-23 20:53:18 -04:00
Jason Walton
3ad332d5d4
Issue #3092 : Fix column numbers in sourcemaps to not be essentially random.
2013-08-06 16:25:23 -04:00
Mal Graty
3c2f0d174e
Use coffee binary of coffee that overrode fork
...
This solves two potential problems when it comes to forking:
1) Forking will now work correctly even when `coffee` is not installed
globally.
2) Forking when using a locally installed version of `coffee` will fork
using that version, and not fallback to a globally installed version.
Fixes #2957
2013-08-02 23:10:45 +01:00
Jeremy Ashkenas
8cf6f62ea4
Merge pull request #3100 from epidemian/issue3023
...
Fix #3023 , Change how error messages are shown
2013-08-02 13:05:37 -07:00
Demian Ferreiro
9e716b310d
Avoid using a getter for the compiler error's "stack" property
...
Instead, set the "stack" property manually when the error gets updated on re-throws.
2013-08-02 01:52:36 -03:00
David Chambers
f5f99b3022
recompile
2013-08-01 14:14:12 -07:00
FredyC
e644f7244d
Using original existence check with mkdirp call on failure
2013-08-01 17:03:32 +02:00
FredyC
457cdfde26
Fixed deep directory creation for command line utility
2013-08-01 11:17:27 +02:00
Marc Häfner
910e38749c
Merge removeMidExpressionNewlines into addImplicitIndentation
...
and rename it to `normalizeLines`
2013-07-31 22:12:44 +02:00
Demian Ferreiro
2b4a37296f
Override the SyntaxError's "stack" property instead of deleting it
...
This makes the "stack" property more useful when it's shown on other Node.js applications that compile CoffeeScript (e.g. testing libraries) and should fix #3023 . A minimal example:
$ node -e 'require("coffee-script").compile("class class")'
/usr/lib/node_modules/coffee-script/lib/coffee-script/coffee-script.js:41
throw err;
^
[stdin]:1:7: error: unexpected CLASS
class class
^^^^^
2013-07-31 09:24:43 -03:00