gandm / language-babel

ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM
https://atom.io/packages/language-babel
MIT License
476 stars 83 forks source link

Arrow function syntax highlight broken when breakdown function params #464

Closed vdhieu closed 6 years ago

vdhieu commented 6 years ago

Hi, I found this error when I'm pass object destructor as param in arrow function.

I'm using Atom: 1.23.1 language-bable: 2.81.1

image

gandm commented 6 years ago

setInputValue should be scoped as a function and rNum etc should be scoped as parameters but aren't. This is because current Atom grammars can't look ahead to following lines, so I can't detect the => which indicates it is a function. Therefore I can't fix it.

Apart from that, I can't see anything else wrong?