yash-syntax-0.10.0
magicant
released this
12 Jul 15:01
·
208 commits
to master
since this release
[0.10.0] - 2024-07-12
Added
source::Code::line_number
- This new method returns the line number of a particular character in the
code.
- This new method returns the line number of a particular character in the
alias::Glossary
- This new trait is now used as an interface to provide the parser with
alias definitions.
- This new trait is now used as an interface to provide the parser with
impl<T> input::Input for T where T: DerefMut<Target: input::Input>
- This new trait implementation allows more types to be used as input
sources, especially when it is used with a decorator that requires
another input source.
- This new trait implementation allows more types to be used as input
input::Context::is_first_line
- This new method allows changing the behavior of the input function
depending on whether the current line is the first line of the input. - The corresponding setter method
set_is_first_line
is also added.
- This new method allows changing the behavior of the input function
Changed
- External dependency versions:
- Rust 1.70.0 → 1.77.0
- annotate-snippets 0.10.0 → 0.11.4
source::Code::source
is nowRc<Source>
instead ofSource
.- This change is made to avoid cloning the
Source
object when theLexer
flushes its buffer and creates a newCode
object sharing the same
Source
. - The lexer constructor
Lexer::new
now takesRc<Source>
instead of
Source
. - The lexer constructor
Lexer::from_memory
now takes a generic parameter
that can be converted toRc<Source>
.
- This change is made to avoid cloning the
- The second argument of
parser::Parser::new
is now&dyn alias::Glossary
instead of&alias::AliasSet
.
Fixed
- Small performance improvements