Closed
Description
do
expressions aren't (quite) supported.
They sort-of work because of support for do/while
loops, but the highlighting breaks down in certain cases.
In particular, they're highlighted incorrectly inside array and object literals.
Examples:
const obj = {
bar: do { // "do" gets jsObjectValue
if (baz) { // "if" gets jsObjectFuncName
'hi'
} else {
'bye'
}
},
} // jsParensError
const arr = [
do { // "do" gets jsBracket
if (baz) { // "if" gets jsObjectFuncName
'hi'
} else {
'bye'
}
}, // jsParensError
]
Granted, do
expressions are at stage 0, but Babel does support them with an official plugin, and I've seen support added to vim-javascript
for other early-stage syntax.
Metadata
Metadata
Assignees
Labels
No labels