Skip to main content

Module utils

Module utils 

Source
Expand description

Implementation of parser combinators

Re-exportsยง

use super::LAngle; ๐Ÿ”’
use super::RAngle; ๐Ÿ”’
use super::lookahead::Peek; ๐Ÿ”’
use crate::ParseCtxt; ๐Ÿ”’
use crate::ParseResult; ๐Ÿ”’
use crate::token::Delimiter; ๐Ÿ”’
use crate::token::TokenKind; ๐Ÿ”’

Functionsยง

angle ๐Ÿ”’
braces ๐Ÿ”’
brackets ๐Ÿ”’
delimited ๐Ÿ”’
Parses an item surrounded by an opening an closing Delimiter
opt_angle ๐Ÿ”’
parens ๐Ÿ”’
punctuated_delimited ๐Ÿ”’
punctuated_until ๐Ÿ”’
Parses a list of zero or more items separated by a punctuation, with optional trailing punctuation. Parsing continues until the requested end token is reached. This does not consume the end token.
punctuated_with_trailing ๐Ÿ”’
Parses a list of zero or more items separated by a punctuation, with optional trailing punctuation. Parsing continues until the requested end token is reached. This does not consume the end token.
repeat_while ๐Ÿ”’
Parses a list of zero or more items. Parsing stops when the next token does not match the specified rule.
sep1 ๐Ÿ”’
Parses a list of one ore more items separated by the requested token. Parsing continues until no separation token is found.
until ๐Ÿ”’
Parses a list of zero or more items. Parsing continues until the requested end token is reached. This does not consume the end token.