Skip to content

Commit 400dd51

Browse files
committed
fix: docstring and deps
1 parent 76a5a8f commit 400dd51

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ let package = Package(
104104
.testTarget(
105105
name: "BinaryParsingMacrosTests",
106106
dependencies: [
107+
"BinaryParsing",
107108
"BinaryParsingMacros",
108109
.product(name: "SwiftSyntax", package: "swift-syntax"),
109110
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),

Sources/BinaryParsing/Macros/Macros.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ public macro magicNumber(_ code: String, parsing input: inout ParserSpan) =
6868
/// - `#magicNumber(_:parsing:)` for 2/4/8 byte magic numbers using fixed-width integers
6969
/// - `InlineArray` for the underlying compile-time array implementation
7070
///
71-
/// - Parameter code: An ASCII string literal representing the expected magic bytes
72-
/// - Parameter input: An inout `ParserSpan` to parse from
71+
/// - Parameters:
72+
/// - code: An ASCII string literal representing the expected magic bytes
73+
/// - input: An inout `ParserSpan` to parse from
7374
/// - Throws: `ParsingError` if parsing fails or bytes don't match
7475
@freestanding(expression)
7576
public macro magic(_ code: String, parsing input: inout ParserSpan) =

Sources/BinaryParsing/Macros/MagicNumber.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ public func _loadAndCheckDirectBytesByteOrder<
6868
///
6969
/// Requires macOS 26+, iOS 26+, watchOS 26+, tvOS 26+, visionOS 26+ due to `InlineArray` usage.
7070
///
71-
/// - Parameter input: An inout `ParserSpan` to parse bytes from
72-
/// - Parameter expectedBytes: An `InlineArray<N, UInt8>` containing the expected byte values
71+
/// - Parameters:
72+
/// - input: An inout `ParserSpan` to parse bytes from
73+
/// - expectedBytes: An `InlineArray<N, UInt8>` containing the expected byte values
7374
/// - Throws: `ParsingError` with `.invalidValue` status if bytes don't match, or propagates
7475
/// any parsing errors from `InlineArray.init(parsing:)`
7576
@available(macOS 26, iOS 26, watchOS 26, tvOS 26, visionOS 26, *)

0 commit comments

Comments
 (0)