Skip to content

feat: switch to the CS2 AST format#317

Merged
alangpierce merged 1 commit intodecaffeinate:masterfrom
alangpierce:use-cs2-ast-format
Feb 18, 2018
Merged

feat: switch to the CS2 AST format#317
alangpierce merged 1 commit intodecaffeinate:masterfrom
alangpierce:use-cs2-ast-format

Conversation

@alangpierce
Copy link
Member

@alangpierce alangpierce commented Feb 18, 2018

There's some CS2-specific code, but we don't yet ever run the CS2 parser.
Instead, we run the CS1 parser, convert that AST to a CS2 AST, then convert that
to a decaffeinate-parser AST. This should make it possible to variably use the
CS1 or CS2 parser depending on configuration.

BREAKING CHANGE: Node 4 is no longer supported. The returned CoffeeScript AST is
now a CS2 AST, and there are slight differences in ranges and AST structure for
comment-only blocks.

@alangpierce alangpierce force-pushed the use-cs2-ast-format branch 2 times, most recently from 7a42cdc to cdf8539 Compare February 18, 2018 04:04
There's some CS2-specific code, but we don't yet ever run the CS2 parser.
Instead, we run the CS1 parser, convert that AST to a CS2 AST, then convert that
to a decaffeinate-parser AST. This should make it possible to variably use the
CS1 or CS2 parser depending on configuration.

BREAKING CHANGE: Node 4 is no longer supported. The returned CoffeeScript AST is
now a CS2 AST, and there are slight differences in ranges and AST structure for
comment-only blocks.
@alangpierce
Copy link
Member Author

FYI @eventualbuddha I'm going to drop support for node 4 in decaffeinate. CS2 is distributed with ES2015 syntax, so it won't run in node 4, and it would be a pain to support CS1 in a way that never requires importing the CS2 code. Node 4 is reaching end-of-life in a few months anyway, and it seems reasonable to use node 6 or later for decaffeinate even if you're still running node 4 in production.

@eventualbuddha
Copy link
Collaborator

I'm going to drop support for node 4 in decaffeinate

Sounds good.

@alangpierce alangpierce merged commit 655f568 into decaffeinate:master Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments