4879 Commits

Author SHA1 Message Date
Julian Rosse
74d6635f95 AST: declarations (#5247)
* Assign declaration

* For

* Class

* import/export

* params

* Catch
2019-11-30 18:49:10 -08:00
Julian Rosse
e8d0deae78 AST: expose tokens (#5246)
* respect withTokens option

* attach tokens to ast
2019-11-30 13:35:04 -08:00
Julian Rosse
95d6ec7492 handle empty program AST (#5245)
Looks good!
2019-11-28 16:31:10 -08:00
Robert de Forest
09c95394e1 Fix #5103: Add support for BigInt literals (#5104)
* Fix #5103: Add support for BigInt literals

* Fix typos found in testing

* Support binary, octal and hex BigInt literals

* Make decimal BigInt test consistent other bases

* Correct test BigInt test names

* Add Node versions to CI
2019-11-26 21:15:03 -08:00
Rich Trott
ddb5dac49d Add debugging information to error message test (#5239)
One of the test cases in test/error_messages.coffee fails intermittently
in the Node.js ecosystem-testing tool CITGM. In an effort to help debug
what's going on when this occurs, this adds more information to the
AssertionError message in question.
2019-10-18 11:03:16 -07:00
Julian Rosse
265b251a7d AST comments: include in blocks; heregex comments (#5233)
* simple trailing comment

* multiple trailing tests

* fix rebase

* leading comments

* empty block

* nested dedented comment

* check preceding

* trailing implicit call in condition

* don't include heregex comments in AST

* expose heregex comments in AST

* heregex comment location data

* don't use object spread
2019-08-24 01:10:08 -07:00
Julian Rosse
7539f7af2e Reconcile ast branch with Prettier plugin: part 2 (#5234)
* pass level

* assign always expression

* escaped backticks in PassthroughLiteral

* computed class properties
2019-08-18 17:30:24 -07:00
Julian Rosse
2f27225e8c JSX namespaced name AST (#5231)
* opening element

* closing element
2019-07-30 17:58:51 -07:00
Julian Rosse
99ad0cc16c Merge master into ast (#5230)
* Fix #5213: Update Babel options to restore MINIFY=false (#5214)

* CSX namespaced tags and attributes (#5218)

* Support namespaces in attributes

* Support namespaces in tag names

* Support reserved words in CSX boolean properties (fix #5125)

* Implement review comments

* Build

* Revert parser.js
2019-07-29 17:49:22 -07:00
Erik Demaine
70c2c4706f CSX namespaced tags and attributes (#5218)
* Support namespaces in attributes

* Support namespaces in tag names

* Support reserved words in CSX boolean properties (fix #5125)

* Implement review comments

* Build

* Revert parser.js
2019-07-29 14:54:57 -07:00
Julian Rosse
9d1af43c91 Start reconciling ast branch with Prettier plugin (#5228)
* export IDENTIFIER

* leading comment + directive

* function hasIndentedBody

* missing o

* Sequence

* root location data with leading comment

* empty interpolations

* fixes from code review
2019-07-29 09:07:10 -07:00
Julian Rosse
c6fdde8834 Chained comparison AST (#5225)
* chained comparison AST

* Explicit return

Co-Authored-By: Geoffrey Booth <GeoffreyBooth@users.noreply.github.com>
2019-07-24 07:11:42 -07:00
Julian Rosse
0174ee082c super AST (#5226) 2019-07-23 16:01:12 -07:00
Julian Rosse
82b7bd3a92 use OptionalMemberExpression/OptionalCallExpression (#5224) 2019-07-21 21:51:46 -07:00
Julian Rosse
1f22c16bee Basic comments AST; PassthroughLiteral AST (#5220)
* passing existing tests

* comments ast

* fixes from code review
2019-07-21 18:05:05 -07:00
Julian Rosse
f33d4dd4f1 Compile heredocs to template literals (#5211)
* compile heredocs to template literals

* disallow pseudo-octal escapes

* extend existing guard against continuations looking like octal escapes

* convert trailing null escapes

* nicer pattern for conditional heregex chunks

* remove covered test
2019-05-15 16:13:59 -07:00
Geoffrey Booth
9c913f86fa Fix #5213: Update Babel options to restore MINIFY=false (#5214) 2019-05-15 15:37:09 -07:00
Julian Rosse
f0bb59790a Directive AST (#5209)
* directive AST

* heredoc AST

* updates from code review
2019-05-05 21:07:04 -07:00
Julian Rosse
391fcc4afa Class AST: bound/computed properties, executable body (#5208)
* executable class body aST

* tests for bound/computed

* remove

* computed
2019-04-29 13:42:36 -07:00
Julian Rosse
7b2fb18a0b Class prototype property AST (#5205)
* class prototype property AST

* consistent naming

* extract fix for #5204
2019-04-28 16:54:59 -07:00
Geoffrey Booth
5596a5c209 Merge branch 'master' of github.com:jashkenas/coffeescript into ast
# Conflicts:
#	lib/coffeescript/grammar.js
#	lib/coffeescript/parser.js
2019-04-28 16:27:26 -07:00
Julian Rosse
71750554c3 Allow computed class properties (#5206)
* fix broken JS output

* static computed properties
2019-04-28 15:45:57 -07:00
Julian Rosse
0574b664e8 Fix #5201: allow leading breaking elision (#5202)
* allow simple breaking elision

* add tests

* use OptComma

* more tests

* trigger CI
2019-04-22 10:21:37 -07:00
Julian Rosse
ca0ac814b3 parse array ending in empty function (#5200) 2019-04-18 15:36:04 -07:00
Julian Rosse
c0b3217766 Class AST: static methods/properties (#5199)
@GeoffreyBooth PR for class static methods/static properties

Remaining parts of class ASTs include bound/computed methods/properties and executable class bodies
2019-04-15 10:06:00 -07:00
Julian Rosse
12a5271489 object property at LEVEL_LIST (#5197) 2019-04-09 23:19:04 -07:00
Geoffrey Booth
f4fcf65750 Don't publish .DS_Store to npm 2.4.1 2019-04-07 20:48:04 -07:00
Geoffrey Booth
92f69b2bca Release 2.4.1 (#5195)
* Fix #5133: Document that braces are required for object shorthand.

* Changelog for 2.4.1

* Update output
2019-04-07 20:41:37 -07:00
Geoffrey Booth
742224471f Actually publish the browser compilers to NPM (#5186)
* Actually publish the browser compilers to NPM

* Transpile and minify modern browser compiler; add to lib/ folder; update docs
2019-04-07 16:09:44 -07:00
Julian Rosse
086430840e basic class ast (#5194) 2019-04-05 21:31:25 -07:00
Julian Rosse
82f92fea97 allow indented property index (#5193) 2019-04-04 08:33:51 -07:00
Erik Demaine
d23919c430 Preserve environment when calling coffee from test (#5191)
This change spawns `coffee` with a new path, but without removing all other
environment variables.  This is useful for preserving environment needed by
Node, for example, `LD_LIBRARY_PATH` on Unix.  In particular, fix #5179.
2019-04-02 11:35:22 -07:00
Julian Rosse
ada35d8951 handle jsx element as expression (#5190) 2019-04-01 09:12:52 -07:00
Julian Rosse
7e0eb6a92d JSX empty expression location data (#5189) 2019-03-31 15:04:08 -07:00
Julian Rosse
28a1a1d304 AST: "CSX" -> "JSX" (#5188)
* updated grammar

* restore JSXIdentifier::astType()
2019-03-31 12:13:05 -07:00
Julian Rosse
0c2d3673d3 ast for jsx content (#5187) 2019-03-31 10:24:58 -07:00
Geoffrey Booth
e6f6aa8c85 Version bump in lockfile 2.4.0 2019-03-30 11:33:20 -07:00
Geoffrey Booth
c09d8fbedb Release 2.4.0 (#5182)
* cake doc:site:watch should also watch the changelog files

* Changelog for 2.4.0

* 2.4.0 output
2019-03-30 11:31:22 -07:00
Julian Rosse
730a4bcdad Tagged template literal AST (#5185)
* tagged template literal ast

* add comment
2019-03-30 11:31:00 -07:00
Julian Rosse
7466c81414 Index at LEVEL_PAREN (#5184) 2019-03-29 12:05:42 -07:00
Julian Rosse
b79ea321a3 regex ast (#5183) 2019-03-29 12:05:03 -07:00
Julian Rosse
ae2f72e15d Heregex AST (#5181)
* heregex ast

* fix from code review
2019-03-28 23:15:09 -07:00
Geoffrey Booth
f6d63776c3 ES module version of compiler for use in browsers; dynamic import() docs; revised Stage 3 policy (#5177)
* Build both a legacy and modern browser compiler

* Dynamic import example and documentation

* Update the docs to use the modern browser compiler if the browser supports it

* Update policy regarding Stage 3 features

* This never made sense, and assigning a string to index 0 *of a string* throws in Module mode (and silently does nothing in Script mode) so remove this unneeded code that throws when compiling `fn for i from from iterable` in Module mode

* Have browser-based tests use the ES module version if supported

* Simplify building logic

* Update output

* For the ES module version of the browser compiler, don't automatically attach the runScripts event handler

* Consistent comments

* Fix comment
2019-03-26 23:55:31 -07:00
Julian Rosse
b982b7cd0e dynamic import AST (#5180) 2019-03-26 08:20:12 -07:00
Geoffrey Booth
0b5bac666f Merge branch 'master' into ast
# Conflicts:
#	lib/coffeescript/grammar.js
#	lib/coffeescript/nodes.js
#	lib/coffeescript/parser.js
#	package-lock.json
#	src/nodes.coffee
#	test/error_messages.coffee
2019-03-24 19:22:33 -07:00
Ruben Bridgewater
41b31c7293 Fix repl.rli deprecation (#5178)
The `rli` property is just a reference to itself. It still exists
for legacy reasons but it will likely be removed in a future major
version. This makes sure everything works as expected.
2019-03-24 19:12:32 -07:00
Julian Rosse
eaeb77a527 String interpolation AST (#5175)
* updated grammar

* empty chunks

* remove unused

* remove unused

* add comment
2019-03-24 19:00:44 -07:00
Geoffrey Booth
ec034e2673 Fix tests (#5176)
* Fix cake test:integrations per newer Webpack

* Update dependencies

* Update dependencies
2019-03-23 23:28:13 -07:00
Julian Rosse
ff24e5ce52 Dynamic import (#5169)
* dynamic import

* updated grammar

* specify callable

* DynamicImportCall

* Fix from code review

Co-Authored-By: helixbass <julian@helixbass.net>

* recompile
2019-03-20 13:08:10 -07:00
Julian Rosse
4549f9a4c5 AST: Preserve infinity literal (#5172)
* updated grammar

* tests
2019-03-17 22:28:51 -07:00