luau_parser/impl/block/comment.rs
1//! All `impl` blocks for [`Comment`].
2
3use luau_lexer::prelude::{Lexer, ParseError, Token, TokenType};
4
5use crate::types::{Comment, Parse};
6
7impl Parse for Comment {
8 #[inline]
9 fn parse(token: Token, _: &mut Lexer, _: &mut Vec<ParseError>) -> Option<Self> {
10 match token.token_type {
11 TokenType::Comment(_) => Some(Self(token)),
12 _ => None,
13 }
14 }
15}