Module lexer

Source
Expand description

词法分析器模块

该模块负责对字符串输入进行词法分析,将字符串转换为令牌(tokens) 使用Strum库进行枚举类型的字符串转换和匹配

Structs§

BracketIter
An iterator over the variants of Bracket
Lexer
Token
Contains information from lexical analysis

Enums§

ArithmeticOperator
Bracket
ComparisonOperator
Identifier
LexerError
词法分析错误类型 定义了在词法分析过程中可能遇到的各种错误情况
LogicalOperator
Operator
QuotationMark
TemplateString
TokenKind
Classification of tokens