; Rust symbol extraction queries
; Captures: @node (declaration), @name (identifier), @exported (visibility_modifier)

; === Exported (pub) declarations ===

; pub fn foo() {}
(function_item
  (visibility_modifier) @exported
  name: (identifier) @name) @node

; pub struct Foo {}
(struct_item
  (visibility_modifier) @exported
  name: (type_identifier) @name) @node

; pub enum Color {}
(enum_item
  (visibility_modifier) @exported
  name: (type_identifier) @name) @node

; pub trait MyTrait {}
(trait_item
  (visibility_modifier) @exported
  name: (type_identifier) @name) @node

; pub const FOO: i32 = 42
(const_item
  (visibility_modifier) @exported
  name: (identifier) @name) @node

; pub static FOO: i32 = 42
(static_item
  (visibility_modifier) @exported
  name: (identifier) @name) @node

; pub type Alias = ...
(type_item
  (visibility_modifier) @exported
  name: (type_identifier) @name) @node

; === Non-exported declarations ===

; fn foo() {}
(function_item
  name: (identifier) @name) @node

; struct Foo {}
(struct_item
  name: (type_identifier) @name) @node

; enum Color {}
(enum_item
  name: (type_identifier) @name) @node

; trait MyTrait {}
(trait_item
  name: (type_identifier) @name) @node

; impl Foo {}
(impl_item
  type: (type_identifier) @name) @node

; const FOO: i32 = 42
(const_item
  name: (identifier) @name) @node

; static FOO: i32 = 42
(static_item
  name: (identifier) @name) @node

; type Alias = ...
(type_item
  name: (type_identifier) @name) @node
