yash-syntax-0.9.0
·
485 commits
to master
since this release
[0.9.0] - 2024-06-09
Added
parser::SyntaxError::RedundantToken
variantparser::lex::ParseOperatorError
struct
Changed
- Implementations of
FromStr
for syntactic elements likeAssign
and
SimpleCommand
now fails withSyntaxError::RedundantToken
if the input
string contains a token that is not part of the element. Lexer::source_string
is no longer generic. The argument type is now
Range<usize>
instead of a generic implementor of
SliceIndex<[SourceChar], Output = [SourceChar]>
.Word::parse_tilde_front
no longer delimits the tilde expansion at an
unquoted:
character.WordLexer::braced_param
now returnsErr(SyntaxError::EmptyParam)
if{
is not followed by any name characters. Previously, it returned
Err(SyntaxError::UnclosedParam{…})
if{
was followed by a non-name
character other than}
.impl std::fmt::Display for SimpleCommand
now prints the command words
after the redirections if there are no assignments and the first word looks
like a keyword.TryFromOperatorError
is now a unit struct rather than an empty normal
struct.
Fixed
- A newline after a bar in a pipeline was not parsed correctly if it appeared as
a result of alias substitution. - Alias substitution was not performed as expected for a token that follows a
result of blank-ending alias substitution if there is a line continuation
between them. - Character location indexes were not calculated correctly after an alias
substitution changed the length of the source code.