mirror of
https://github.com/github/semantic.git
synced 2024-11-29 02:44:36 +03:00
CofreeTypes have a static curried Wrap constructor function.
This commit is contained in:
parent
c6962c798d
commit
9ff1840e4a
@ -121,6 +121,12 @@ public protocol CofreeType: TermType {
|
||||
var extract: Annotation { get }
|
||||
}
|
||||
|
||||
extension CofreeType {
|
||||
public static func Wrap(annotation: Annotation)(syntax: Syntax<Self, Leaf>) -> Self {
|
||||
return Self(annotation, syntax)
|
||||
}
|
||||
}
|
||||
|
||||
extension Cofree: CofreeType {}
|
||||
|
||||
extension CofreeType where Self.Annotation == Range<String.Index> {
|
||||
|
Loading…
Reference in New Issue
Block a user