neo_solidity/lexer.rs
1//! Yul Lexer Module
2//!
3//! Lexical analyzer for the Yul intermediate language. Converts Yul source code
4//! into a stream of tokens for parsing.
5//!
6//! # Supported Tokens
7//!
8//! - Keywords: `let`, `if`, `else`, `for`, `switch`, `case`, `default`, `function`, etc.
9//! - Operators: `:=`, `->`, `+`, `-`
10//! - Literals: decimal numbers, hex numbers (`0x...`), strings
11//! - Identifiers: variable and function names
12//! - Built-in functions: `add`, `sub`, `mul`, `div`, `mload`, `sstore`, etc.
13//!
14//! # Example
15//!
16//! ```ignore
17//! use neo_solidity::lexer::Lexer;
18//!
19//! let mut lexer = Lexer::new(\"let x := add(1, 2)\");
20//! let tokens = lexer.tokenize()?;
21//! ```
22
23use crate::error::CompilerError;
24
25include!("lexer/lexer_types.rs");
26include!("lexer/lexer_impl.rs");
27
28#[cfg(test)]
29mod tests;