Skip to content

Commit 29759d1

Browse files
WasmParser: Move NameMap and ParsedNames to the top level
To avoid making these types under generic context
1 parent c0f96a8 commit 29759d1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Sources/WasmParser/WasmParser.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,21 +1174,21 @@ extension Parser {
11741174
}
11751175
}
11761176

1177+
/// A map of names by its index.
1178+
public typealias NameMap = [UInt32: String]
1179+
1180+
/// Parsed names.
1181+
public enum ParsedNames {
1182+
/// Function names.
1183+
case functions(NameMap)
1184+
}
1185+
11771186
/// A parser for the name custom section.
11781187
///
11791188
/// > Note: <https://webassembly.github.io/spec/core/appendix/custom.html#name-section>
11801189
public struct NameSectionParser<Stream: ByteStream> {
11811190
let stream: Stream
11821191

1183-
/// A map of names by its index.
1184-
public typealias NameMap = [UInt32: String]
1185-
1186-
/// Parsed names.
1187-
public enum ParsedNames {
1188-
/// Function names.
1189-
case functions(NameMap)
1190-
}
1191-
11921192
public init(stream: Stream) {
11931193
self.stream = stream
11941194
}

0 commit comments

Comments
 (0)