Implement Binary Operators and Grouping (in Expressions)

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-03-23 07:55:11 -04:00
parent 7c35b2b6e5
commit 2861a82777
7 changed files with 420 additions and 15 deletions
+4
View File
@@ -133,6 +133,10 @@ extension Result: CustomStringConvertible {
}
}
public func Map<T, U>(input: T, block: (T) -> U) -> U {
return block(input)
}
@freestanding(expression) public macro RequireOkResult<T>(_: Result<T>) -> Bool =
#externalMacro(module: "Macros", type: "RequireResult")
@freestanding(expression) public macro RequireErrorResult<T>(_: Error, _: Result<T>) -> Bool =