Skip to main content

ScopeResolveConfig

Struct ScopeResolveConfig 

Source
pub struct ScopeResolveConfig {
Show 20 fields pub class_scope_nodes: &'static [&'static str], pub impl_scope_nodes: &'static [&'static str], pub function_scope_nodes: &'static [&'static str], pub class_name_field: ClassNameField, pub assignment_rules: &'static [AssignmentRule], pub assignment_recurse_into: &'static [&'static str], pub param_rules: &'static [ParamRule], pub return_type_field: Option<&'static str>, pub call_nodes: &'static [&'static str], pub call_style: CallNodeStyle, pub new_expr_nodes: &'static [&'static str], pub new_expr_type_field: &'static str, pub composite_literal_nodes: &'static [&'static str], pub member_access: &'static [MemberAccess], pub scoped_call_nodes: &'static [&'static str], pub self_keywords: &'static [&'static str], pub init_strategy: InitStrategy, pub import_extractor: Option<ImportExtractorFn>, pub external_method: bool, pub builtins: &'static [&'static str],
}
Expand description

Configuration for scope-aware reference resolution. Captures the AST node names and strategies that differ per language.

Fields§

§class_scope_nodes: &'static [&'static str]

AST node types that create class/struct scopes

§impl_scope_nodes: &'static [&'static str]

AST node types that create impl scopes (Rust impl_item, Swift extension)

§function_scope_nodes: &'static [&'static str]

AST node types that create function/method scopes

§class_name_field: ClassNameField

How to extract the class name from a class scope node

§assignment_rules: &'static [AssignmentRule]

Rules for scanning variable assignments to track types

§assignment_recurse_into: &'static [&'static str]

Node types to recurse into when scanning assignments

§param_rules: &'static [ParamRule]

Rules for extracting typed parameters from function signatures

§return_type_field: Option<&'static str>

Field name for return type annotation on function nodes (None = body heuristic only)

§call_nodes: &'static [&'static str]

AST node types that represent function/method calls

§call_style: CallNodeStyle

How call nodes expose the callee. FunctionField = node has a “function” field containing an identifier or member_expression. DirectMethod = node has object+name fields directly.

§new_expr_nodes: &'static [&'static str]

AST node types for new Foo() expressions

§new_expr_type_field: &'static str

Field name on new-expression nodes that holds the type/constructor name.

§composite_literal_nodes: &'static [&'static str]

AST node types for struct/composite literals (Go Foo{})

§member_access: &'static [MemberAccess]

How member access / method calls are represented in the AST

§scoped_call_nodes: &'static [&'static str]

Scoped identifier nodes (Rust Type::method)

§self_keywords: &'static [&'static str]

Self/this keywords to recognize

§init_strategy: InitStrategy

Strategy for extracting instance attribute types

§import_extractor: Option<ImportExtractorFn>

Import extraction function (the only truly per-language piece)

§external_method: bool

Whether methods are declared externally with receiver types (Go-style)

§builtins: &'static [&'static str]

Language builtins to skip during resolution

Auto Trait Implementations§

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, 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.