In Swift 4.1, you can't create an extension in another project adding an initializer that doesn't delegate (see SE-0189).
While this does not affect DDMathParser itself, it affected us since we re-use the MathParserError in our code to prevent having to add basically the same error type again.
This PR simply adds a public init to the error type. Since it has the same interface as the previously compiler-provided initializer, it should be fully compatible with existing code - even in Swift versions before 4.1. The latter is why I didn't conditionally include this initializer (#if swift(>4.1))...
In Swift 4.1, you can't create an extension in another project adding an initializer that doesn't delegate (see SE-0189). While this does not affect DDMathParser itself, it affected us since we re-use the
MathParserError
in our code to prevent having to add basically the same error type again. This PR simply adds a public init to the error type. Since it has the same interface as the previously compiler-provided initializer, it should be fully compatible with existing code - even in Swift versions before 4.1. The latter is why I didn't conditionally include this initializer (#if swift(>4.1)
)...