kodlian / swiftregexdsl Goto Github PK
View Code? Open in Web Editor NEWA Declarative Structured Language for regular expressions in Swift.
License: MIT License
A Declarative Structured Language for regular expressions in Swift.
License: MIT License
The latest commit f54bd19 adding the missing public initializers changed the type of the changed structs from Regex
to StaticRegex
.
Unfortunately the Type Definition for StaticRegex seems to be missing from the package causing 13 compiler errors:
Cannot find type 'StaticRegex' in scope
using the following code in a test app, importing the SwiftRegexDSL Package does not work
import SwiftRegexDSL
struct Number:Regex{
var body: Regex{
Digit()
.oneOrMore()
}
}
and results in the following compiler error:
'Digit' initializer is inaccessible due to 'internal' protection level
Default initializers in Swift are declared internal and can't be accessed from outside the package.
Unfortunately this means you have to manually add a public memberwise initializer to all structs using a default one now (digit is only one example)
The body
property in the Regex
protocol can be annotated with @RegexBuilder
so that conforming types implicitly get a regex-built body.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.