jashkenas / jashkenas/coffeescript
Support export destructured assignment
- Dominant language
- CoffeeScript
- Stars
- 16.6k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
Choose one: is this a bug report or feature request?
Feature request
@GeoffreyBooth I came across an unsupported `export` syntax that appears to be standard
### Input Code
```coffee
export {foo, bar} = item
```
### Expected Behavior
Should transpile to `export var {foo, bar} = item`
### Current Behavior
Doesn't compile
### Possible Solution
Guessing it won't be bad to add this as a supported grammar rule
### Context
Not blocking anything, just came across it while working on AST stuff
### Environment
* CoffeeScript version:
* Node.js version:
Contributor guide
Research direction
Reproduce the CoffeeScript input `export {foo, bar} = item` with the compiler and compare it with the expected `export var {foo, bar} = item` output. Start by tracing the grammar and AST handling for export and destructured assignment; done means the syntax compiles to the expected JavaScript without regressing related cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript, javascript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100