ptx_parser/parser/instruction/
trap.rs1#![allow(unused)]
6
7use crate::parser::{
8 PtxParseError, PtxParser, PtxTokenStream, Span,
9 util::{
10 between, comma_p, directive_p, exclamation_p, lbracket_p, lparen_p, map, minus_p, optional,
11 pipe_p, rbracket_p, rparen_p, semicolon_p, sep_by, string_p, try_map,
12 },
13};
14use crate::r#type::common::*;
15use crate::{alt, ok, seq_n};
16
17pub mod section_0 {
18 use super::*;
19 use crate::r#type::instruction::trap::section_0::*;
20
21 impl PtxParser for Trap {
22 fn parse() -> impl Fn(&mut PtxTokenStream) -> Result<(Self, Span), PtxParseError> {
23 try_map(seq_n!(string_p("trap"), semicolon_p()), |(_, _), span| {
24 ok!(Trap {})
25 })
26 }
27 }
28}