pub fn unified_query(
selector_str: &str,
scope: &Scope,
code_cache: &mut CodeCache,
store: &mut AnnotationStore,
resolvers: &ResolverRegistry,
opts: Option<&QueryOptions>,
) -> Result<Vec<QueryResult>, AqlError>Expand description
Main query entry point.
Pipeline:
- Parse selector. If tag is not in CODE_TAGS, rewrite to
[ann_tag="{tag}"]+ original attrs. code_cache.ensure_scope(scope, resolvers)— lazy parse code files.- Refresh annotation sidecars in scope.
- For each file in scope: flatten CodeElement tree, look up annotations, build UnifiedNode list.
- Match unified nodes against selector via
filter_by_selector. - Build QueryResult from matched nodes (deduplicate by source location).