acornjs / acorn-jsx

Alternative, faster React.js JSX parser
MIT License
646 stars 72 forks source link

Support for acorn_loose #32

Closed angelozerr closed 7 years ago

angelozerr commented 8 years ago

It should be cool if acorn-jsx could support acorn_loose to give the capability to parse JSX which is not well formatted to use it for completion with https://github.com/angelozerr/tern-react

RReverser commented 8 years ago

Huh, well, it would be, but not too easy given that JSX can contain multiline arbitrary content and you rarely know the original intent/formatting. I tried at some point, but then gave it up. Feel free to PR if you want to work on it.

angelozerr commented 8 years ago

If you cannot support that, I will not available to do that -(

Hope a guy could implement acorn_losse one day to benefit with completion with React/JSX.

Thanks for your answer.

RReverser commented 8 years ago

It was here https://github.com/RReverser/acorn-jsx/commit/e0bcfca03f8b044de2f23306c18f431d3d578c9a and around just in case you're interested.