Skip to content

0.4.0

Compare
Choose a tag to compare
@stephencelis stephencelis released this 06 Dec 22:51
· 156 commits to main since this release
  • Added: initializer overloads of Prefix and other parsers that aid in type inference. E.g., the following now type-checks:
    Prefix { $0 == " " }
    // Inferred to be "Prefix<Substring>"
    
    Prefix { $0 == .init(ascii: " ") }
    // Inferred to be "Prefix<Substring.UTF8View>"
  • Added: CharacterSet now conforms to Parser.
  • Changed: Many will now trigger a warning breakpoint when its upstream parser succeeds but fails to consume any data, which can cause an infinite loop.
  • Fixed: Double.parser() exponent parsing (thanks @bradhowes) and general Double parsing edge cases.
  • Infrastructure: documentation fixes (thanks @igor1309).
  • Infrastructure: improved "arithmetic" demo parser to use more ergonomic/performant InfixOperator parser.
  • Infrastructure: benchmarks now better reflect typical parsing (substring UTF8 views vs. unsafe buffer pointers).