-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only use custom types to have full control over transforms
- Loading branch information
Showing
17 changed files
with
305 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import Mustache | ||
|
||
struct EBool { | ||
var underlying: Bool | ||
|
||
init(_ underlying: Bool) { | ||
self.underlying = underlying | ||
} | ||
} | ||
|
||
extension EBool: CustomStringConvertible { | ||
var description: String { | ||
self.underlying.description | ||
} | ||
} | ||
|
||
extension EBool: WithNormalizedTypeName { | ||
static var normalizedTypeName: String { | ||
"Bool" | ||
} | ||
} | ||
|
||
extension EBool: CustomReflectable { | ||
var customMirror: Mirror { | ||
self.underlying.customMirror | ||
} | ||
} | ||
|
||
extension EBool: Comparable { | ||
static func < (lhs: EBool, rhs: EBool) -> Bool { | ||
!lhs.underlying && rhs.underlying | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Sources/EnumeratorMacroImpl/Types/EMustacheTransformable.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Mustache | ||
|
||
/// The same as `MustacheTransformable` but only for this library's types. | ||
protocol EMustacheTransformable: MustacheTransformable {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.