Specs do NOT reflect actual highlighting
alpyre opened this issue · comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
"Run Package Specs" results with zero failures, yet the actual highlighting on the editor is faulty.
Steps to Reproduce
- Open c-spec.coffee and copy the code for "conditionals".
- Create a new c file and paste the code.
- See it does NOT highlight the keyword "defined" correctly:
- Yet the scope for that keyword in the spec is: keyword.control.directive.conditional.c
Line 407 in 04a707c
Expected behavior: This should have caused a spec failure.
Actual behavior: It does not!?
Reproduces how often: %100
Versions
Latest stable version (both linux and Windows versions):
Atom: 1.32.2
Electron: 2.0.9
Chrome: 61.0.3163.100
Node: 8.9.3
Additional Information
I could not reproduce it on Atom 1.31.2 (language-c: 0.60.4). This looks like a quite serious issue and maybe it is deeper than this package.
Those specs are for a different grammar system than the one being used in your editor, which is why they are passing. To toggle back to the old one, go Settings -> Core -> Use Tree Sitter Parsers
As for the issue, someone else will have to comment on that. It does look like the parse tree handles it, but the scopes aren't as before.