Skip to content

Commit df50dfb

Browse files
chore: Adds variable access to singletons
1 parent d44a284 commit df50dfb

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Sources/Haystack/Marker.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ public let marker = Marker()
66
public struct Marker: Val {
77
public static var valType: ValType { .Marker }
88

9+
public static var val: Self {
10+
return marker
11+
}
12+
913
public func toZinc() -> String {
1014
return "M"
1115
}

Sources/Haystack/NA.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ public let na = NA()
66
public struct NA: Val {
77
public static var valType: ValType { .NA }
88

9+
public static var val: Self {
10+
return na
11+
}
12+
913
public func toZinc() -> String {
1014
return "NA"
1115
}

Sources/Haystack/Null.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ public let null = Null()
66
public struct Null: Val {
77
public static var valType: ValType { .Null }
88

9+
public static var val: Self {
10+
return null
11+
}
12+
913
public func toZinc() -> String {
1014
return "N"
1115
}

0 commit comments

Comments
 (0)