Crate brush_parser

Source
Expand description

Implements a tokenizer and parsers for POSIX / bash shell syntax.

Modules§

arithmetic
Parser for shell arithmetic expressions.
ast
Defines the Abstract Syntax Tree (ast) for shell programs. Includes types and utilities for manipulating the AST.
pattern
Implements parsing for shell glob and extglob patterns.
prompt
Parser for shell prompt syntax (e.g., PS1).
readline_binding
Implements a parser for readline binding syntax.
test_command
Parser for shell test commands.
word
Parser for shell words, used in expansion and other contexts.

Structs§

ParseErrorLocation
Represents a parsing error with its location information
Parser
Implements parsing for shell programs.
ParserOptions
Options used to control the behavior of the parser.
SourceInfo
Information about the source of tokens.
SourcePosition
Represents a position in a source shell script.
TestCommandParseError
Represents an error that occurred while parsing a (non-extended) test command.
TokenLocation
Represents the location of a token in its source shell script.
TokenizerOptions
Options controlling how the tokenizer operates.

Enums§

BindingParseError
Represents an error that occurred while parsing a key-binding specification.
ParseError
Represents an error that occurred while parsing tokens.
Token
Represents a token extracted from a shell script.
TokenizerError
Represents an error that occurred during tokenization.
WordParseError
Represents an error that occurred while parsing a word.

Functions§

parse_tokens
Parses a sequence of tokens into the abstract syntax tree (AST) of a shell program.
tokenize_str
Break the given input shell script string into tokens, returning the tokens.
tokenize_str_with_options
Break the given input shell script string into tokens, returning the tokens.
uncached_tokenize_str
Break the given input shell script string into tokens, returning the tokens. No caching is performed.
unquote_str
Return a string with all the quoting removed.