Skip to main content

cmake_tidy_parser/
parsed.rs

1use cmake_tidy_ast::TextRange;
2use cmake_tidy_lexer::Token;
3use thiserror::Error;
4
5#[derive(Debug, Clone)]
6pub struct Parsed<T> {
7    pub syntax: T,
8    pub tokens: Vec<Token>,
9    pub errors: Vec<ParseError>,
10}
11
12#[derive(Debug, Clone, PartialEq, Eq, Error)]
13#[error("{message}")]
14pub struct ParseError {
15    pub message: String,
16    pub range: TextRange,
17}