1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
Commit graph

6 commits

Author SHA1 Message Date
Geoffrey Booth
7e35c2c3da We no longer need to wrap in quotes JavaScript reserved words used as properties (#4527) 2017-04-24 09:23:42 -07:00
Julian Rosse
89db842c3d merge master 2017-04-20 14:41:28 -05:00
Geoffrey Booth
ae096a331a Merge branch 'master' into 2
# Conflicts:
#	Cakefile
#	documentation/sections/changelog.md
#	documentation/sections/classes.md
#	documentation/sections/fat_arrow.md
#	documentation/sections/installation.md
#	documentation/sections/introduction.md
#	documentation/sections/resources.md
#	documentation/sections/scripts.md
#	lib/coffeescript/repl.js
#	src/lexer.coffee
2017-04-17 19:52:34 -07:00
Geoffrey Booth
db216ec384 [CS2] 2.0.0-beta1 (#4499)
* Fix browser build to incorporate Markdown-It, not Marked

* Update Google Closure Compiler; recompile browser build but with MINIFY=false, because Closure Compiler throws an error on our current code; see https://github.com/google/closure-compiler-js/issues/59

* Bump version to 2.0.0-beta1; do release build, with updated docs and annotated source
2017-04-13 10:42:32 -07:00
Geoffrey Booth
b192e215a5 [CS2] Destructuring (#4478)
* Output simple array destructuring assignments to ES2015

* Output simple object destructured assignments to ES2015

* Compile shorthand object properties to ES2015 shorthand properties

This dramatically improves the appearance of destructured imports.

* Compile default values in destructured assignment to ES2015

* Rename `wrapInBraces` to `wrapInParentheses`, and `compilePatternMatch` to `compileDestructuring`, for clarity; style improvements (no `==` or `!=`, etc.)

* Don’t confuse the syntax highlighter

* Comment Assign::compilePatternMatch a bit

* Assignment expressions in conditionals are a bad practice

* Optional check for existence that only checks `!== undefined`, not `!= null`, to follow ES convention that default values only apply when a variable is undefined, not falsy

* Add comments; remove unnecessary array splats in function tests

* The fallback destructuring code should apply default values only if `undefined`, not falsy, to follow ES spec

* Support destructuring in function parameters (first pass); catch destructured reserved words

* Destructured variables in function parameter lists shouldn’t be added to the function body with `var` declarations; treat splat array function parameters the legacy way to avoid rethinking #4005

* Remove redundancy in undefined-only check for existence; fix passing option to check

* Fix undefined redundancy

* Simplify getting the variable name

* Reimplement “check for existence if not undefined” without creating a new operator

* `Obj::isAssignable` should not mutate; pass `lhs` property in from `Assign` or `Code` to child arrays and objects so that those child nodes are set as allowable for destructuring

* Revert changes to tests

* Restore revised test for empty destructuring assignment
2017-04-06 10:06:45 -07:00
Geoffrey
4cc701a9da Remove hyphen in coffee-script 2017-02-12 17:00:05 -08:00
Renamed from lib/coffee-script/repl.js (Browse further)