ptx_parser/type/
mod.rs

1//! PTX type definitions - Abstract Syntax Tree (AST) nodes.
2//!
3//! All types are re-exported at the top level for easy access:
4//! - `ptx_parser::r#type::Module` - Root module type
5//! - `ptx_parser::r#type::Instruction` - Instruction with label/predicate
6//! - `ptx_parser::r#type::Operand` - Operand types
7//! - etc.
8//!
9//! Instruction variants are under a separate namespace:
10//! - `ptx_parser::r#type::instruction::Inst` - Enum of all instruction variants
11//! - Individual instruction modules under `ptx_parser::r#type::instruction::*`
12
13// Internal modules - accessible within crate but not publicly exposed
14// Types are re-exported at top level for public API
15pub(crate) mod common;
16pub(crate) mod function;
17pub(crate) mod module;
18pub(crate) mod variable;
19
20// Only instruction module is public
21pub mod instruction;
22
23// Re-export all common types at the top level (explicit list)
24pub use common::{
25    AddressBase, AddressOffset, AddressOperand, AddressSpace, AttributeDirective, Axis,
26    CodeLinkage, CodeOrDataLinkage, DataLinkage, DataType, FunctionSymbol, GeneralOperand,
27    Immediate, Instruction, Label, Operand, Predicate, PredicateRegister, RegisterOperand, Sign,
28    SpecialRegister, TexHandler2, TexHandler3, TexHandler3Optional, TexType, VariableSymbol,
29    VectorOperand,
30};
31
32// Re-export module types
33pub use module::{
34    AddressSizeDirective, FileDirective, LinkingDirective, Module, ModuleDebugDirective,
35    ModuleDirective, ModuleInfoDirectiveKind, SectionDirective, TargetDirective, VersionDirective,
36};
37
38// Re-export function types
39pub use function::{
40    DwarfDirective, EntryFunction, ExternCallBlock, ExternCallSetup, FuncFunction, FunctionAlias,
41    FunctionBody, FunctionDim3, FunctionEntryDirective, FunctionHeaderDirective,
42    FunctionKernelDirective, FunctionStatement, LocationDirective, PragmaDirective,
43    RegisterDirective, StatementDirective, StatementSectionDirective,
44};
45
46// Re-export variable types
47pub use variable::{ModuleVariableDirective, VariableDirective};