sentri_dsl_parser/lexer.rs
1//! Lexer for the Sentri DSL (uses pest internally).
2
3/// Token type placeholder; pest handles tokenization.
4/// This module is included for future extensibility.
5pub struct Token {
6 /// Token type.
7 pub token_type: TokenType,
8 /// Source position (line, col).
9 pub position: (usize, usize),
10}
11
12/// Token types.
13#[derive(Debug, Clone, PartialEq, Eq)]
14pub enum TokenType {
15 /// Invariant keyword.
16 Invariant,
17 /// Identifier.
18 Identifier(String),
19 /// Integer literal.
20 Integer(i128),
21 /// Boolean literal.
22 Boolean(bool),
23 /// Operator.
24 Operator(String),
25 /// Left brace.
26 LeftBrace,
27 /// Right brace.
28 RightBrace,
29 /// Left paren.
30 LeftParen,
31 /// Right paren.
32 RightParen,
33 /// Comma.
34 Comma,
35 /// End of file.
36 Eof,
37}