ptx_parser/unparser/
mod.rs1pub(crate) mod common;
2pub(crate) mod function;
3pub(crate) mod instruction;
4pub(crate) mod module;
5pub(crate) mod variable;
6
7use crate::lexer::PtxToken;
8
9#[allow(unused_imports)]
10pub(crate) use common::{
11 push_decimal, push_directive, push_identifier, push_opcode, push_register, push_token_from_str,
12};
13
14pub trait PtxUnparser {
17 fn unparse_tokens(&self, tokens: &mut Vec<PtxToken>);
19
20 fn to_tokens(&self) -> Vec<PtxToken> {
22 let mut tokens = Vec::new();
23 self.unparse_tokens(&mut tokens);
24 tokens
25 }
26}