Grammar fails to detect ObjC method calls
mountainstorm opened this issue · 1 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: https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: https://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
Objective-C grammar doesn't detect method calls. As a result it reports the wrong scopes and doesn't show the method argument names as highlighted.
It also doesn't detect "self" so there's probably some other bug as well.
This issue does not affect Sublime Text which uses a different grammar.
Steps to Reproduce
Put this code into your editor
@implementation ClassName
- (void)method:(void*) a
defined: (void *) b
here: (void*) c
{
[self unhighlighted:a
call:b];
}
@end
Notice that the call to -[ClassName unhighlighted:call:] isn't highlighted.
If you dump the scopes on lines 8/9 you get the following:
8 source.objc meta.implementation.objc meta.scope.implementation.objc meta.function-with-body.objc meta.block.c punctuation.definition.begin.bracket.square.c
9 source.objc meta.implementation.objc meta.scope.implementation.objc meta.function-with-body.objc meta.block.c punctuation.definition.end.bracket.square.c
9 source.objc meta.implementation.objc meta.scope.implementation.objc meta.function-with-body.objc meta.block.c punctuation.terminator.statement.c
So it's clear it's not being detected
Expected behavior:
We get a set of unique scopes for the method call and it's argument names
Actual behavior:
It doesn't
Reproduces how often:
100%
Versions
Version of the grammar in this repo
Additional Information
Nope