We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 954a508 commit b6242a0Copy full SHA for b6242a0
Sources/SwiftOperators/OperatorTable.swift
@@ -42,6 +42,19 @@ public struct OperatorTable {
42
}
43
44
45
+ /// Initialize the operator precedence instance with a given set of
46
+ /// operators and precedence groups.
47
+ ///
48
+ /// If any error occurs, it will be thrown.
49
+ public init(
50
+ precedenceGroups: [PrecedenceGroup],
51
+ operators: [Operator]
52
+ ) throws {
53
+ try self.init(precedenceGroups: precedenceGroups, operators: operators) {
54
+ throw $0
55
+ }
56
57
+
58
/// Record the operator in the given operator array.
59
private func record(
60
_ op: Operator,
0 commit comments