Skip to content

Commit a15f18f

Browse files
committed
Updated to 0.3.2
1 parent a2ae313 commit a15f18f

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Master
44

5+
## 0.3.2
6+
7+
#### Fixed
8+
- Fixed the parsing of files with anonymous functions within the public functions #15
9+
10+
[Commits](https://github.com/yonaskolb/Beak/compare/0.3.1...0.3.2)
11+
512
## 0.3.1
613

714
#### Added

Sources/BeakCore/Beak.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public struct BeakOptions {
1818

1919
public class Beak {
2020

21-
public let version: String = "0.3.1"
21+
public let version: String = "0.3.2"
2222
public let options: BeakOptions
2323

2424
public init(options: BeakOptions) {

Sources/BeakCore/SwiftParser.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public struct SwiftParser {
6161
let publicNames = functionSignature.split(separator: "(").last!.split(separator: ":")
6262
var index = 0
6363
let bodyOffset = structure.int(.bodyOffset)
64-
let params: [Function.Param] = try structure.substructure.filter { $0.kind == .varParameter && ($0.int(.offset) ?? 0) < (bodyOffset ?? 1) }.map { paramStructure in
64+
let params: [Function.Param] = try structure.substructure.filter { $0.kind == .varParameter && ($0.int(.offset) ?? 0) < (bodyOffset ?? 1) }.map { paramStructure in
6565
let paramName = paramStructure.string(.name) ?? ""
6666
var name = String(publicNames[index])
6767
var unnamed = false

Tests/BeakTests/BeakTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class BeakTests: XCTestCase {
6767
}
6868
""", parsedTo: Function(name: "topFunction", params: [
6969
.init(name: "path", type: .string, optional: false),
70-
]))
70+
]))
7171

7272
try expectFunction("public func unnamed(_ noName: String) {}", parsedTo: Function(name: "unnamed", params: [
7373
.init(name: "noName", type: .string, optional: false, unnamed: true),

0 commit comments

Comments
 (0)