You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Objective-C: C-style enum (and typedef enum) declarations are dropped #4095
The Objective-C extractor emits @interface, @implementation and @protocol type nodes, but plain enum and typedef enum definitions are dropped entirely — the enum type and all of its members are missing from the graph. Every other language with enums emits a type node plus a case_of edge per member (Java #1719, C++ #3939, Swift).
Minimal reproduction
// Color.m
#import<Foundation/Foundation.h>enum Color { Red, Green, Blue };
typedefenum { North, South } Direction;
Color and Direction type nodes, each with case_of edges to its members.
Actual
Neither the enum types nor their members appear; only the file node (and any classes) are emitted.
Why it matters
ObjC enums are everywhere in real codebases; a [Color]-typed field or a switch over an enum has no type to point at. Unlike C (whose class_types is empty by design), the ObjC extractor is object-oriented and already models named types, so enums are an inconsistency within its own model.
Note
The NS_ENUM/NS_OPTIONS macro spelling is a separate matter: tree-sitter-objc parses it into an ERROR subtree, so it has no clean AST and is out of scope here. This is about the plain C-style enum / typedef enum forms, which parse cleanly.
Activity
github-actions commentedon Oct 5, 2026
Thanks for opening this issue, @rajatnagda45. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
safishamsi commentedon Oct 5, 2026
Resolved by #4096 (thanks @rajatnagda45), shipped in v0.9.77. Closing as fixed.