Skip to content

Commit

Permalink
Add .spi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-ukjeong committed Jan 7, 2025
1 parent 820b86f commit a62410d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: [Strix]
1 change: 1 addition & 0 deletions Sources/Strix/Parsers/CharacterParsers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ extension Parser where T == Character {
}
}

/// Use the ``satisfy(_:_:)`` instead.
@available(*, deprecated, renamed: "satisfy(_:_:)")
public static func satisfy(
_ predicate: @escaping (Character) -> Bool,
Expand Down
10 changes: 5 additions & 5 deletions Sources/Strix/Parsers/Operators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ infix operator <?> : AdditionPrecedence // one with label
infix operator <!> : AdditionPrecedence // print

extension Parser {
/// `lhs <|> rhs` is equivalent to `alternative(lhs, rhs)`.
/// This operator is equivalent to ``alternative(_:_:)``.
public static func <|> (lhs: Parser<T>, rhs: Parser<T>) -> Parser<T> {
return alternative(lhs, rhs)
}

/// `lhs *> rhs` is equivalent to `discardFirst(lhs, rhs)`.
/// This operator is equivalent to ``discardFirst(_:_:)``.
public static func *> <U>(lhs: Parser<U>, rhs: Parser<T>) -> Parser<T> {
return discardFirst(lhs, rhs)
}

/// `lhs <* rhs` is equivalent to `discardSecond(lhs, rhs)`.
/// This operator is equivalent to ``discardSecond(_:_:)``.
public static func <* <U>(lhs: Parser<T>, rhs: Parser<U>) -> Parser<T> {
return discardSecond(lhs, rhs)
}

/// `p <?> label` is equivalent to `p.label(label)`.
/// This operator is equivalent to ``label(_:)``.
public static func <?> (p: Parser<T>, label: String) -> Parser<T> {
return p.label(label)
}

/// `p <!> label` is equivalent to `p.print(label)`.
/// This operator is equivalent to ``print(_:to:)`` with `nil` output stream.
public static func <!> (p: Parser<T>, label: String) -> Parser<T> {
return p.print(label)
}
Expand Down
2 changes: 2 additions & 0 deletions Sources/Strix/Parsers/PrimitiveParsers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ extension Parser {
}
}

/// Use the ``one(of:)`` instead.
@available(*, deprecated, renamed: "one(of:)")
public static func any<S: Sequence>(of parsers: S) -> Parser<T> where S.Element == Parser<T> {
return one(of: parsers)
Expand Down Expand Up @@ -329,6 +330,7 @@ extension Parser where T == Void {
}
}

/// Use the ``satisfyUserInfo(_:_:)`` instead.
@available(*, deprecated, renamed: "satisfyUserInfo(_:_:)")
public static func satisfyUserInfo(
_ predicate: @escaping (UserInfo) -> Bool,
Expand Down

0 comments on commit a62410d

Please sign in to comment.