Skip to content

yash-syntax-0.10.0

Compare
Choose a tag to compare
@magicant magicant released this 12 Jul 15:01
· 208 commits to master since this release
yash-syntax-0.10.0

[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.
  • alias::Glossary
    • This new trait is now used as an interface to provide the parser with
      alias definitions.
  • 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.
  • 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.

Changed

  • External dependency versions:
    • Rust 1.70.0 → 1.77.0
    • annotate-snippets 0.10.0 → 0.11.4
  • source::Code::source is now Rc<Source> instead of Source.
    • This change is made to avoid cloning the Source object when the Lexer
      flushes its buffer and creates a new Code object sharing the same
      Source.
    • The lexer constructor Lexer::new now takes Rc<Source> instead of
      Source.
    • The lexer constructor Lexer::from_memory now takes a generic parameter
      that can be converted to Rc<Source>.
  • The second argument of parser::Parser::new is now &dyn alias::Glossary
    instead of &alias::AliasSet.

Fixed

  • Small performance improvements