Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSX syntax highlighting #23

Open
jeremyfa opened this issue Mar 20, 2016 · 4 comments
Open

JSX syntax highlighting #23

jeremyfa opened this issue Mar 20, 2016 · 4 comments
Labels

Comments

@jeremyfa
Copy link

FYI, I have been experimenting JSX syntax highlighting inside Haxe code in Atom (see screenshot below). It both works with jsx('<something>') (ie. haxe-react) and @jsx '<something>' constructs.

For now, the code is on a language-haxe fork (where I am working on improving the grammar in general, even though it is at exploration stage for now): https://github.com/jeremyfa/language-haxe

I thought some people around there might be interested about this.

capture d ecran 2016-03-20 a 23 51 18

@elsassph
Copy link
Contributor

This is looking awesome.

@kevinresol
Copy link
Contributor

@jeremyfa I am testing your fork and there is no "issues" page there, so I post here:

Seems the syntax will break if there is a single quote inside the string, although is has been escaped.
screen shot 2016-04-08 at 5 26 53 pm

@kevinresol
Copy link
Contributor

And inconsistent format for enum with & without parameters

screen shot 2016-04-08 at 5 42 13 pm

But it seems tricky, because it is hard to know what the identifier actually is, by just looking at the syntax.

@jeremyfa
Copy link
Author

Thanks @kevinresol for the feedback!

Right now enum values look different because the ones with parenthesis are interpreted as function calls. But it can be fixed for sure! That said, I am wondering if we wouldn't want to keep them a bit different still? (I mean, still differentiate enum values with parameters and enum values without) idk

I will check the single quote in xml too, thanks!

Also, issues were indeed disabled on the repo, but I enabled them (I didn't notice they were disabled at the first place).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants