-
Notifications
You must be signed in to change notification settings - Fork 57
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
syntax highlighting issues #73
Comments
I have to admit that the ACE rules were very hard to write - the whole thing is build on regular expressions that are a pain to debug. If you want to take a look, the source can be found here |
@taktak I would like to hack on the ACE highlighting rules. Turns out there is a rule tester, which makes the process much easier. Do you have any unit tests for it? It would be good to set up a comprehensive single HJSON test file that has every possible usecase, and ensure that the rules produce what is expected. Thanks! |
@nyurik I'm not familiar with the rule tester but we have a lot of tests in https://github.com/hjson/hjson/tree/master/testCases These target the parser but we have also used them to check the syntax (although manually as I know of no other highlighters that allow unit tests). |
@laktak ACE has a bunch of tokenization test for many languages - https://github.com/ajaxorg/ace/tree/master/lib/ace/mode/_test - so we can add one for hjson there as well. I guess the |
The same happens with quoted and unquoted string values. |
Hi, awesome project, I would really like to use it, but ACE support seems to be partially broken, and might need a bit of love. As an editor, I should always know exactly what each element will be treated as, without knowing HJSON rules by heart. I feel that syntax highlighting should be in line with how JSON itself works in ACE: simply show how each element will be parsed -- structure elements
{}[]:,
comments, object keys, object string, number, booleans, and null values, and most importantly - errors. While ace seems to have extra support for json parsing, even showing things in a bright red will highlight problems, even if it doesn't cover all of them initially.The text was updated successfully, but these errors were encountered: