Skip to main content

ObjC

Struct ObjC 

Source
pub struct ObjC;
Expand description

Objective-C language support.

Trait Implementations§

Source§

impl Language for ObjC

Source§

fn name(&self) -> &'static str

Display name for this language (e.g., “Python”, “C++”)
Source§

fn extensions(&self) -> &'static [&'static str]

File extensions this language handles (e.g., [“py”, “pyi”, “pyw”])
Source§

fn grammar_name(&self) -> &'static str

Grammar name for arborium (e.g., “python”, “rust”)
Source§

fn as_symbols(&self) -> Option<&dyn LanguageSymbols>

Capability query: returns Some(self) if this language has code symbols (functions, classes, types, etc.). Returns None for config/data languages. Implement LanguageSymbols and override this to opt in.
Source§

fn build_signature(&self, node: &Node<'_>, content: &str) -> String

Build the display signature for a definition node. Default: first line of the node’s source text (trimmed). Override for languages where first-line is incomplete (e.g. Rust, Go, Java).
Source§

fn extract_imports(&self, node: &Node<'_>, content: &str) -> Vec<Import>

Extract imports from an import node (may return multiple)
Source§

fn format_import(&self, import: &Import, _names: Option<&[&str]>) -> String

Format an import as source code. If names is Some, only include those names (for multi-import filtering). If names is None, format the complete import.
Source§

fn is_test_symbol(&self, symbol: &Symbol) -> bool

Check if a symbol is a test (for filtering).
Source§

fn container_body<'a>(&self, node: &'a Node<'a>) -> Option<Node<'a>>

Find the body node of a container (for prepend/append)
Source§

fn analyze_container_body( &self, body_node: &Node<'_>, content: &str, inner_indent: &str, ) -> Option<ContainerBody>

Analyze a container body node and return the editable byte range. body_node is the node returned by container_body. Returns None if this language doesn’t support container body editing.
Source§

fn extract_implements(&self, node: &Node<'_>, content: &str) -> ImplementsInfo

Extract interfaces/traits/superclasses that a container node implements/extends. Called by generic extraction for container nodes only.
Source§

fn node_name<'a>(&self, node: &Node<'_>, content: &'a str) -> Option<&'a str>

Get the name of a node (typically via “name” field)
Source§

fn extract_docstring(&self, _node: &Node<'_>, _content: &str) -> Option<String>

Extract the docstring for a definition node. Called by generic extraction for every tagged symbol. Returns None if this language has no docstring convention or the node has no docstring.
Source§

fn extract_attributes(&self, _node: &Node<'_>, _content: &str) -> Vec<String>

Extract attributes/annotations/decorators attached to a definition node. Called by generic extraction for every tagged symbol. Returns empty vec if this language has no attribute convention.
Source§

fn refine_kind( &self, node: &Node<'_>, _content: &str, tag_kind: SymbolKind, ) -> SymbolKind

Refine the symbol kind for a tagged node. Called after tag classification assigns an initial kind (e.g. definition.classClass). Languages can override this to return a more specific kind based on the node’s concrete type. Default: return tag_kind unchanged.
Source§

fn signature_suffix(&self) -> &'static str

Suffix to append to signatures for tree-sitter parsing. Function signatures are incomplete code fragments that need closing tokens to parse correctly (e.g., Rust fn foo() needs {}, Lua function foo() needs end). Returns the suffix to append, or empty string if none needed.
Source§

fn get_visibility(&self, _node: &Node<'_>, _content: &str) -> Visibility

Get visibility of a node. Read more
Source§

fn test_file_globs(&self) -> &'static [&'static str]

Glob patterns (relative, using ** wildcards) that identify dedicated test files. Used to build a GlobSet for fast batch matching. Return &[] for languages with no dedicated test files (e.g. those using only inline tests).
Source§

fn as_embedded(&self) -> Option<&dyn LanguageEmbedded>

Capability query: returns Some(self) if this language can contain embedded blocks in another language (e.g., JS in Vue, CSS in HTML). Returns None for most languages. Implement LanguageEmbedded and override this to opt in.
Source§

fn body_has_docstring(&self, _body: &Node<'_>, _content: &str) -> bool

Detect if first child of body is a docstring
Source§

fn extract_module_doc(&self, _src: &str) -> Option<String>

Extract the module-level doc comment from raw file source. Read more
Source§

impl LanguageSymbols for ObjC

Auto Trait Implementations§

§

impl Freeze for ObjC

§

impl RefUnwindSafe for ObjC

§

impl Send for ObjC

§

impl Sync for ObjC

§

impl Unpin for ObjC

§

impl UnsafeUnpin for ObjC

§

impl UnwindSafe for ObjC

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more