ptx_parser/parser/instruction/
exit.rs

1//! Original PTX specification:
2//!
3//! exit;
4
5#![allow(unused)]
6
7use crate::lexer::PtxToken;
8use crate::parser::{PtxParseError, PtxParser, PtxTokenStream, Span};
9use crate::r#type::common::*;
10
11pub mod section_0 {
12    use super::*;
13    use crate::r#type::instruction::exit::section_0::*;
14
15    impl PtxParser for Exit {
16        fn parse(stream: &mut PtxTokenStream) -> Result<Self, PtxParseError> {
17            stream.expect_string("exit")?;
18            stream.expect_complete()?;
19            stream.expect(&PtxToken::Semicolon)?;
20            Ok(Exit {})
21        }
22    }
23}