Skip to main content

CallLowerCtx

Trait CallLowerCtx 

Source
pub trait CallLowerCtx {
    // Required methods
    fn is_local_value(&self, name: &str) -> bool;
    fn is_user_type(&self, name: &str) -> bool;
    fn resolve_module_call<'a>(
        &self,
        dotted: &'a str,
    ) -> Option<(&'a str, &'a str)>;
}
Expand description

Shared semantic lowering helpers that sit between resolved AST and concrete backends.

This is intentionally Aver-specific, not Rust- or VM-specific. Backends can provide a tiny context adapter and ask the shared layer what a call-shaped expression means semantically before choosing their own target encoding.

Required Methods§

Source

fn is_local_value(&self, name: &str) -> bool

Whether this identifier names a local runtime value and therefore must remain a dynamic call target rather than a direct function/namespace path.

Source

fn is_user_type(&self, name: &str) -> bool

Whether this name denotes a user-defined type in the current compilation context.

Source

fn resolve_module_call<'a>(&self, dotted: &'a str) -> Option<(&'a str, &'a str)>

Resolve a dotted path to (module_prefix, local_suffix) when it refers to a user module path rather than a builtin namespace.

Implementors§