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

export default async nor parsed correctly #438

Closed bradennapier closed 7 years ago

bradennapier commented 7 years ago

Identical to the one you fixed earlier but when using export

image

gandm commented 7 years ago

@bradennapier This is tricky to fix as I can't read ahead! async is not a protected word so export default async ( could be part of the following code:-

export default async (
);

i.e. export a function named async which is valid JS.

I guess I might treat the space between the async and ( as relevant and assume an arrow function in this case. I'll chew this over.

Also, I'd appreciate it if this issue and your others had a title that more clearly described the error as it makes it hard to review.

bradennapier commented 7 years ago

no problem ! will do! appreciate it... used this as a template when creating my tcl highlighting grammar - doubt i would have been able to figure it out without so appreciate it!

gandm commented 7 years ago

Fixed in 2.76.4