cel/parser/lexer
Types
pub type Position {
Position(byte_offset: Int, byte_size: Int)
}
Constructors
-
Position(byte_offset: Int, byte_size: Int)
pub type Token {
Ident(String)
Int(String)
UInt(String)
Float(String)
String(String)
Bytes(BitArray)
Bool(Bool)
Null
Plus
Minus
Star
Slash
Percent
LessThan
LessThanEq
GreaterThan
GreaterThanEq
Equals
NotEquals
In
Or
And
LeftParen
RightParen
LeftCurly
RightCurly
LeftSquare
RightSquare
At
Dot
Colon
SemiColon
Comma
ExclamationMark
Hash
QuestionMark
Comment(String)
Whitespace(String)
EndOfFile
Reserved(String)
UnterminatedString(String)
UnterminatedBytes(BitArray)
UnexpectedGrapheme(String)
InvalidByteLiteral(String)
}
Constructors
-
Ident(String)
-
Int(String)
-
UInt(String)
-
Float(String)
-
String(String)
-
Bytes(BitArray)
-
Bool(Bool)
-
Null
-
Plus
-
Minus
-
Star
-
Slash
-
Percent
-
LessThan
-
LessThanEq
-
GreaterThan
-
GreaterThanEq
-
Equals
-
NotEquals
-
In
-
Or
-
And
-
LeftParen
-
RightParen
-
LeftCurly
-
RightCurly
-
LeftSquare
-
RightSquare
-
At
-
Dot
-
Colon
-
SemiColon
-
Comma
-
ExclamationMark
-
Hash
-
QuestionMark
-
Comment(String)
-
Whitespace(String)
-
EndOfFile
-
Reserved(String)
-
UnterminatedString(String)
-
UnterminatedBytes(BitArray)
-
UnexpectedGrapheme(String)
-
InvalidByteLiteral(String)
Functions
pub fn discard_comments(lexer: Lexer) -> Lexer
pub fn discard_whitespace(lexer: Lexer) -> Lexer
pub fn is_ident_grapheme(grapheme: String) -> Bool
pub fn take_content(
source: String,
content: String,
predicate: fn(String) -> Bool,
) -> #(String, String)