fix: add Objective-C support for .m/.mm files - #556
Open
VBS2004 wants to merge 1 commit into
Open
Conversation
Add tree-sitter-objc grammar and language extractor so .m/.mm files produce meaningful structural analysis instead of empty summaries. - Add objectivec.ts language config (extensions: .m, .mm) - Add ObjcExtractor: @interface/@implementation classes, @Property, @protocol, multi-part selectors, message sends, call graph - Register config + extractor in index files - Map .m/.mm -> objective-c in scan-project.mjs LANGUAGE_BY_EXT - Add tree-sitter-objc@3.0.2 dependency + allowBuild - Add 49 tests (22 unit + 8 regression + 19 registry + 2 compat) - Add 7 ObjC test fixture files covering typical iOS project patterns Fixes: Egonex-AI#554
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #554
Problem
.mand.mmfiles had no tree-sitter grammar or extractor, causing the file-analyzer to produce empty summaries like "contains 0 function definitions" for every Objective-C file. The scanner also mapped.mto the raw extension string "m" instead of "objective-c" via the language registry.Changes
objectivec.ts) — extensions.m/.mm, tree-sitter-objc grammar, ObjC-specific concepts@interface/@implementation→ classes (merged)@protocol→ surfaced as class entries@property→ properties with proper name extraction#import/#include→ imports[recv selector:arg]) → call graphNSLog,dispatch_*) → call graph.mand.mmadded toLANGUAGE_BY_EXT→objective-ctree-sitter-objc@3.0.2+ allowBuild.h/.m/.mmtest files covering typical iOS patternsVerification