Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Linux Platform #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noppoMan
Copy link

Hi, I'm just using this for parsing hal+json content in my own library and then, I saw following 2 compiling errors on Swift version 3.1 (swift-3.1-RELEASE) Target: x86_64-unknown-linux-gnu environment.

error: incorrect argument label in call (have 'pattern:', expected 'coder:')
      static let expression = try! NSRegularExpression(pattern: "\\{.+\\}")
                                                      ^~~~~~~~
                                                       coder
error: missing argument for parameter 'options' in call
    return Templated.expression.numberOfMatches(in: href, range: range) > 0
                                                        ^
                                                        , options: <#NSMatchingOptions#>
Foundation.NSRegularExpression:4:17: note: 'numberOfMatches(in:options:range:)' declared here
    public func numberOfMatches(in string: String, options: Foundation.NSMatchingOptions, range: Foundation.NSRange) -> Int

The Linux version of NSRegularExpression and numberOfMatches seems to be unable to omit options label.

So I tried to add options labels and it worked fine on Linux. Here is testing results
If you'd like it, please merge this. Anyways, Thanks for creating such a great library.

@Yasumoto
Copy link

@royratcliffe howdy! Any chance this could get merged? If so I've got a PR that I'd love to merge in here upstream: noppoMan#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants