Objective-C lexer cannot identify message without parameters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 885
- PR merge metrics
- No merged PRs in 30d
Description
(Original issue 1113 created by renfeisong on 2015-05-28T05:20:12.611862+00:00)
For example,
#!objective-c
[[NSCoreService serviceCenter] registerSubscriber:self];
The lexer will recognize registerSubscriber: as a method label (because there is a parameter follows it), but it will ignore serviceCenter (interpreted as Token.Name which is the same as the receiver NSCoreService).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the reported snippet through Pygments' Objective-C lexer and inspect how it tokenizes the receiver and message selectors. Trace the lexer rules handling selectors with and without parameters, then add or update a regression test for this example. Done means serviceCenter is distinguished from the receiver and the complete message is tokenized consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c, python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100