- Breaking: Updated to Swift 5.7 to be able to use primary associated types and simplify the DSL
- Breaking: Replaced
Recursive
with a protocol. To make a parser recursive, we no longer use theRecursive
wrapper, but instead make our parser conform toRecursiveParser
. This removes the added work of passing references of the recursive parser around.
- Fixed
mapWithLocation
reporting the wrong location. - Fixed caching not being effective on iOS, watchOS and tvOS.
- Added automatic wrapping of errors with the location in code.
- Added property wrapper
Located
that allows you to store a value along with the location in the text where it's read from. - Binary Operation has all it's values annotated with the location.
- String Escape Strategy mimicking JavaScript.
- Experimental: Added support for using RegexBuilder inside of the Syntax DSL.
- Updated to Swift 5.4 to ensure we can call our Result Builders, Result Builders.
- Syntax Tree depedency is not exported as an import. So you no longer have to import it if you're reading from the AST.
- Breaking: Renamed associated type for Parser from
Output
toParsed
. Since Apple added a type forString.Output
which conflicts with our definition. Let's hope thatParsed
remains specific enough that Apple doesn't use that either.
- Fixed memory issue that arose from parsing sequences.
- Allowing support to be used in other platforms.
- Fixed issue with created AST not receiving updates when scanning ahead.
- Breaking: Refactored API completely to be based on Result Builders. This API no longer requries you to separate your logic into a Tokenizer and a Parser. It's all just parsers now.
- Renamed package to
Syntax
- Moved to Swift Package Manager
- Added
StringLiteralEscapingStrategy
andescapingStrategy
argument toStringLiteralTokenGenerator
, for handling escaped characters in a String Literal - Added default
SwiftStringLiteralEscapingStrategy
andJSONStringLiteralEscapingStrategy
for the standard handling for String Literals
- Initial Release