pub struct CppStructuralSpec;Trait Implementations§
Source§impl Debug for CppStructuralSpec
impl Debug for CppStructuralSpec
Source§impl Default for CppStructuralSpec
impl Default for CppStructuralSpec
Source§fn default() -> CppStructuralSpec
fn default() -> CppStructuralSpec
Source§impl StructuralSpec for CppStructuralSpec
impl StructuralSpec for CppStructuralSpec
Source§fn call_site_facts(
&self,
node: Node<'_>,
source: &str,
context: &CallSiteContext,
) -> Option<CallSiteFacts>
fn call_site_facts( &self, node: Node<'_>, source: &str, context: &CallSiteContext, ) -> Option<CallSiteFacts>
A new_expression is a constructor call, and a call whose callee names
a function-like macro of this translation unit has an argument list
that belongs to the macro, not to the callable that finally runs
(#1478). CALL_TWICE(2) parses as an ordinary call of two source
arguments even when the expansion calls a three-parameter callable, so
the honest answer is unknown coverage and no argument rows at all —
never a fabricated list an exact-arity assertion could read as clean.
The boundary is deliberate: only macros defined in this file are known here, because that is what this file’s parse tree contains. A macro defined in an included header leaves the site exact, which is the same answer the analyzer gives today.
Source§fn occurrence_role_support(&self) -> &OccurrenceRoleSupport
fn occurrence_role_support(&self) -> &OccurrenceRoleSupport
C++ has not learned occurrence-role classification yet (#1473). The empty table is the honest answer: queries and assertions that ask for an occurrence role here report incomplete rather than clean-empty.
fn language(&self) -> Language
Source§fn kind_table(&self) -> &'static [(&'static str, NormalizedKind)]
fn kind_table(&self) -> &'static [(&'static str, NormalizedKind)]
Language::id_for_node_kind;
a per-language test must assert every entry resolves (id != 0) so
grammar bumps that rename nodes fail loudly.Source§fn refine_kind(
&self,
node: Node<'_>,
kind: NormalizedKind,
enclosing: Option<NormalizedKind>,
source: &str,
_context: &CallSiteContext,
) -> NormalizedKind
fn refine_kind( &self, node: Node<'_>, kind: NormalizedKind, enclosing: Option<NormalizedKind>, source: &str, _context: &CallSiteContext, ) -> NormalizedKind
enclosing
is the kind of the nearest enclosing normalized node, and context is
the per-file CallSiteContext from Self::call_site_context, for
refinements that depend on file-wide facts (Ruby’s value-position bare
calls).Source§fn supports_kind(&self, kind: NormalizedKind) -> bool
fn supports_kind(&self, kind: NormalizedKind) -> bool
kind.Source§fn supports_role(&self, role: Role) -> bool
fn supports_role(&self, role: Role) -> bool
role precisely enough to evaluate a
query that asks for it.Source§fn call_site_context(&self, root: Node<'_>, source: &str) -> CallSiteContext
fn call_site_context(&self, root: Node<'_>, source: &str) -> CallSiteContext
Source§fn lexical_environment_support(&self) -> &LexicalEnvironmentSupport
fn lexical_environment_support(&self) -> &LexicalEnvironmentSupport
Source§fn materialization_support(&self) -> &DeclarationMaterializationSupport
fn materialization_support(&self) -> &DeclarationMaterializationSupport
Source§fn reference_edge_support(&self) -> &ReferenceEdgeSupport
fn reference_edge_support(&self) -> &ReferenceEdgeSupport
Source§fn identity_route_support(&self) -> &IdentityRouteSupport
fn identity_route_support(&self) -> &IdentityRouteSupport
Self::occurrence_role_support: the tables are total, so a default
would let a new adapter (or a new axis or relation) advertise support
nobody implemented. Adapters that answer nothing yet return
super::routes::NO_IDENTITY_ROUTE_SUPPORT.Source§fn extract(&self, node: Node<'_>, kind: NormalizedKind, sink: &mut RoleSink<'_>)
fn extract(&self, node: Node<'_>, kind: NormalizedKind, sink: &mut RoleSink<'_>)
node.Source§fn should_extract(&self, _node: Node<'_>, _kind: NormalizedKind) -> bool
fn should_extract(&self, _node: Node<'_>, _kind: NormalizedKind) -> bool
Source§fn generator_construct(
&self,
_node: Node<'_>,
_kind: NormalizedKind,
) -> Option<&'static str>
fn generator_construct( &self, _node: Node<'_>, _kind: NormalizedKind, ) -> Option<&'static str>
Source§fn binding_activation(
&self,
_binder: Node<'_>,
_scope: Range,
) -> Option<BindingActivation>
fn binding_activation( &self, _binder: Node<'_>, _scope: Range, ) -> Option<BindingActivation>
binder introduces into the scope whose range is scope,
and over which byte interval it is in effect. Read moreSource§fn occurrence_namespace(
&self,
role: OccurrenceRole,
declares: Option<NormalizedKind>,
) -> Option<Namespace>
fn occurrence_namespace( &self, role: OccurrenceRole, declares: Option<NormalizedKind>, ) -> Option<Namespace>
role resolves in, where declares is
the normalized kind of the fact this token names – the enclosing fact
whose own name span is exactly this token, and None when the token
names no fact. Read moreSource§fn indirection_relation(&self, _token: Node<'_>) -> Option<RouteHopKind>
fn indirection_relation(&self, _token: Node<'_>) -> Option<RouteHopKind>
Import for a plain import, Export for an export of a local
declaration, ReExport for an export whose subject comes from
elsewhere (pub use, export ... from). Read from the token’s
enclosing statement through AST fields. Read moreSource§fn qualified_path_root<'tree>(&self, _token: Node<'tree>) -> Option<Node<'tree>>
fn qualified_path_root<'tree>(&self, _token: Node<'tree>) -> Option<Node<'tree>>
token participates in: the
outermost chain node (a scoped_identifier, dotted_name,
nested_identifier, or language equivalent) whose ordered segments
include this token. None when the token is not part of a qualified
path — including when it is a bare single identifier, which is not a
path. Read moreSource§fn path_segment_tokens<'tree>(&self, _root: Node<'tree>) -> Vec<Node<'tree>>
fn path_segment_tokens<'tree>(&self, _root: Node<'tree>) -> Vec<Node<'tree>>
root, in
source order, read from the grammar’s own chain structure (AST fields,
never text splitting). Includes segment tokens that are not facts
(Rust’s crate/self/super path keywords), so ordinals state the
real position of each segment within the path. Read moreSource§fn segment_generic_arity(&self, _token: Node<'_>) -> Option<u32>
fn segment_generic_arity(&self, _token: Node<'_>) -> Option<u32>
token’s
segment position, read from the grammar’s argument-list field. None
means no generic arguments are spelled there — which is a statement
about the source text, not about the declaration’s own arity.Source§fn decode_spelling(&self, _raw: &str) -> Option<String>
fn decode_spelling(&self, _raw: &str) -> Option<String>
raw denotes once the grammar’s identifier escaping is
removed (Rust’s r#type is the identifier type). Read moreSource§fn embedded_leaf_facts(
&self,
_node: Node<'_>,
_kind: NormalizedKind,
_source: &str,
_cancellation: Option<&CancellationToken>,
) -> Vec<EmbeddedLeafFact>
fn embedded_leaf_facts( &self, _node: Node<'_>, _kind: NormalizedKind, _source: &str, _cancellation: Option<&CancellationToken>, ) -> Vec<EmbeddedLeafFact>
Auto Trait Implementations§
impl Freeze for CppStructuralSpec
impl RefUnwindSafe for CppStructuralSpec
impl Send for CppStructuralSpec
impl Sync for CppStructuralSpec
impl Unpin for CppStructuralSpec
impl UnsafeUnpin for CppStructuralSpec
impl UnwindSafe for CppStructuralSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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