Expand description
Auto-generated module
🤖 Generated with SplitRS
Re-exports§
pub use crate::ast_impl::Decl;pub use crate::ast_impl::Located;pub use crate::ast_impl::SurfaceExpr;pub use crate::error_impl::ParseError;pub use crate::error_impl::ParseErrorKind;pub use crate::lexer::Lexer;pub use crate::parser_impl::Parser;pub use crate::tokens::Span;pub use crate::tokens::Token;pub use crate::tokens::TokenKind;
Functions§
- collect_
results - Collect a sequence of Results, stopping at the first error.
- consume
- Consume a specific token.
- consume_
ident - Consume any identifier.
- count_
until - Count tokens from
posuntilend_token(exclusive). - find_
matching_ close - Find the matching closing token for an open bracket at
pos. - ident_
at - Extracts the identifier at a given byte position.
- is_
keyword - Checks if a string is a keyword in OxiLean.
- is_
multi_ char_ op - Checks if a string is a multi-char operator.
- is_
operator_ start - Checks if a character is a valid start of an operator.
- is_
valid_ decl - Check whether a source string is parseable as a declaration.
- is_
valid_ expr - Check whether a source string is parseable as an expression.
- is_
valid_ identifier - Checks if a string is a valid OxiLean identifier.
- line_
col_ to_ offset - Computes byte offset from line and column in source.
- nesting_
depth_ at - Computes the nesting depth at a given position in source.
- offset_
to_ line_ col - Computes line and column from byte offset in source.
- parse_
decl - Parse a single declaration from source text.
- parse_
decls - Parse all declarations in a source file.
- parse_
expr - Parse a single expression from source text.
- parse_
ident - A simple token-based identifier parser (returns name + new pos).
- parse_
many0 - A simple parser combinator: many0 (zero or more).
- parse_
many1 - A simple parser combinator: many1 (one or more).
- parse_
number - A simple token-based number parser.
- parse_
optional - A simple parser combinator: optional.
- parse_
parens - Parse a parenthesised sequence.
- parse_
sep_ by - A simple parser combinator: separated list.
- parse_
string_ lit - A simple token-based string literal parser.
- peek
- A utility to peek at token
poswithout consuming it.