Expand description
Per-file syntax facts persisted in content records and consumed by inspect.
Structs§
- Fact
Parsers - File
Analysis - GoDispatch
Facts - GoMethod
Fact - Macro
Token RefContribution - RawImport
Contribution - RawReexport
Contribution - Reexport
Specifier - Rust
ApiFacts - Rust
ApiItem - Rust
ApiModule - Rust
ApiUse - Rust
CfgTest Range - Rust
Initializer - Rust
Macro Token - Rust
Reexport Specifier - Stored
File Facts - What dead-code analysis reads from one file’s syntax tree, recorded once per content when the data layer parses the file, so an analysis reads it from the file’s content record instead of parsing again.
- Stored
JsFacts - A JavaScript or TypeScript file’s imports and re-exports, read when the Oxc engine has no facts for the file.
- Stored
Rust Facts - A Rust file’s facts.
Enums§
- Rust
CfgTest Module - An out-of-line module a file declares under
#[cfg(test)], by the#[path]it gives or by its name.
Constants§
- MAX_
RUST_ API_ NESTING - How many modules and item macros
rust_collect_api_factsdescends through, counted together. Real code nests a handful; past the bound the items are left undescribed rather than recursing further, because each level costs a stack frame (a stack overflow aborts the process) and copies the module path, so a file of thousands of nested modules would otherwise take quadratic time and memory. - MAX_
RUST_ USE_ GROUP_ NESTING - How deep
rust_api_use_pathsfollows nested{...}groups of oneusedeclaration. Real code nests a few; deeper groups are dropped rather than recursed into, because each level costs a stack frame (a stack overflow aborts the process) and copies the path prefix and the group’s text, so thousands of levels would take quadratic time and memory. - RUST_
MACRO_ REF_ SHAPE_ CALL - RUST_
MACRO_ REF_ SHAPE_ METHOD - RUST_
MACRO_ REF_ SHAPE_ STRUCT - TOP_
LEVEL_ SYMBOL
Functions§
- cfg_
predicate_ requires_ test - collect_
rust_ macro_ token_ refs - Adds to
refsthe references the macro invocations underrootmake through their tokens, each attributed to the function around it (the innermost ofscope_stackand the function items above the invocation). - collect_
rust_ macro_ tokens - Appends the leaf tokens under
roottotokens, in source order, skipping the subtreesrust_macro_token_node_is_opaquenames. The walk keeps its place in a tree cursor rather than recursing, so deeply nested token trees cannot overflow the stack. - export_
source_ module - extract_
rust_ macro_ token_ refs - find_
child_ by_ kind - The first node of kind
kindbelownode, in source order (nodeitself excluded). The search keeps its place in a tree cursor rather than recursing, so a deeply nested file cannot overflow the stack, which would abort the process. - go_
dispatch_ facts - go_
method_ signature - go_
module_ dir - The directory of the Go module the file at
file(relative_filefrom the project root) belongs to, relative to the root: the nearest directory above it holding ago.mod, or the root’s own when none does. - go_
signature_ types - macro_
ref_ path - macro_
scoped_ symbol - node_
text - normalize_
relative_ segments - Resolves
.and..segments of a project-relative path textually. - raw_
imports_ from_ tree - rust_
api_ facts - rust_
api_ macro_ expansion - rust_
api_ type_ path - rust_
api_ use_ paths - rust_
api_ use_ paths_ at rust_api_use_pathsfortext, nesteddepthgroups deep.- rust_
attribute_ requires_ test - Whether
attributeis#[cfg(...)]with a predicate requiringtest. - rust_
cfg_ test_ module_ files_ for - The project-relative candidate files of
modules, declared in the file atrelative_file. - rust_
cfg_ test_ modules - The file-level
#[cfg(test)]out-of-line module declarations of a file, in source order. - rust_
cfg_ test_ ranges - Line ranges compiled only for tests:
#[cfg(test)]items (modules, functions, impls, types, traits, constants and statics), plus#[cfg(test)]statements, blocks and nested items inside a function body. Calls on these lines are test usage, and declarations on them are test code. - rust_
children_ cfg_ test_ gated parent’s named children, each with whetherrust_node_has_cfg_test_attributeholds for it, worked out in one pass over the children. Asking each child separately walks back over every comment before it, which is quadratic in a file of many comment lines.- rust_
collect_ api_ facts - Adds to
factsthe modules, uses and items declared directly inrootand, through module bodies and item macros, below it.depthis how many modules and item macros encloseroot. - rust_
collect_ api_ macro_ items - rust_
collect_ api_ macro_ text - rust_
function_ body_ calls - Calls that run when this Rust function body runs.
- rust_
function_ declaration_ list_ owner - rust_
function_ symbol_ name - rust_
globs_ parent_ module - Whether the file has a file-level
use super::*;(the import parser keeps no record of glob imports, so this reads the syntax tree directly). - rust_
impl_ scope_ name - rust_
item_ start_ line - rust_
macro_ name_ is_ upper_ camel - rust_
macro_ next_ after_ optional_ turbofish - rust_
macro_ path_ before - rust_
macro_ text_ is_ identifier - rust_
macro_ token_ is_ identifier - rust_
macro_ token_ is_ keyword - rust_
macro_ token_ is_ path_ segment - rust_
macro_ token_ node_ is_ opaque - rust_
macro_ token_ refs - rust_
mod_ scope_ chain - rust_
module_ file - The project-relative file of the out-of-line module at
nested(its module path inside the declaring file), declared in the file atfile, withpath_overridefrom its#[path]attribute. - rust_
node_ has_ cfg_ test_ attribute - rust_
normalize_ module_ path - rust_
path_ attribute_ value - The string value of a
#[path = "../../../aft/src/parser/..."]attribute attached tonode. - rust_
path_ segments - rust_
pub_ use_ statements - rust_
qualified_ item_ name - rust_
raw_ import_ contributions - rust_
raw_ reexport_ contributions - rust_
reexport_ specifier - rust_
reexport_ specifiers - rust_
serde_ function_ references - Functions named by serde field attributes (
deserialize_with = "f",serialize_with,default,skip_serializing_if). serde calls them from derived code the callgraph never sees, so they are liveness roots. Each root is the declaration identity the path names from the attribute’s module, so"parse"insidemod configrootsconfig::parse(seerust_serde_root_identity). - rust_
serde_ root_ identity - The declaration identity a serde callback path names from module
scope.helpers::parseinsidemod configisconfig::helpers::parse; a leadingself,superorcratefixes the starting module. A relative path that is not declared inscopeis looked up in each enclosing module in turn, as ause super::...import usually brings it from there, and a bare name declared exactly once in the file resolves to that declaration. A path that names no declaration in this file keeps only its last segment. - rust_
template_ token_ tree - The
token_treenode spanning exactlystart..end, including its delimiters. Templates nested in another template are token trees of the outer one, so they are found the same way. - rust_
token_ tree_ invokes_ metavariable_ macro - Whether a template token tree, at any depth, invokes a macro named by a
metavariable: a
$nametoken followed by!, with comments and whitespace allowed in between, as in$callback /* note */ !(..). - rust_
trait_ impl_ methods - Names of the methods defined inside
impl Trait for Typeblocks anywhere in the file (including inline modules). - rust_
unrestricted_ pub - split_
cfg_ predicates - string_
literal_ content - supports_
type_ refs - ts_
namespace_ reexport_ name - ts_
raw_ reexport_ contributions - ts_
reexport_ specifiers