Skip to content

Commit

Permalink
Improve parser + Fix tests for 1.8.29-e4796b9b
Browse files Browse the repository at this point in the history
  • Loading branch information
Kylmakalle committed May 9, 2024
1 parent 50db14d commit 59751e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/TDLibKitTests/TDLibKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class TDLibKitUnitTests: XCTestCase {

func testEquatableStructsWithEnums() {
let struct1 = EditMessageLiveLocation(
chatId: 1234567, heading: 10, location: Location(horizontalAccuracy: 10.0, latitude: 358.0, longitude: 259.1), messageId: 12345, proximityAlertRadius: 30, replyMarkup: .replyMarkupInlineKeyboard(
chatId: 1234567, heading: 10, livePeriod: 0x7FFFFFFF, location: Location(horizontalAccuracy: 10.0, latitude: 358.0, longitude: 259.1), messageId: 12345, proximityAlertRadius: 30, replyMarkup: .replyMarkupInlineKeyboard(
ReplyMarkupInlineKeyboard(
rows: [
[
Expand All @@ -134,7 +134,7 @@ class TDLibKitUnitTests: XCTestCase {
)

let struct2 = EditMessageLiveLocation(
chatId: 1234567, heading: 10, location: Location(horizontalAccuracy: 10.0, latitude: 358.0, longitude: 259.1), messageId: 12345, proximityAlertRadius: 30, replyMarkup: .replyMarkupInlineKeyboard(
chatId: 1234567, heading: 10, livePeriod: 0x7FFFFFFF, location: Location(horizontalAccuracy: 10.0, latitude: 358.0, longitude: 259.1), messageId: 12345, proximityAlertRadius: 30, replyMarkup: .replyMarkupInlineKeyboard(
ReplyMarkupInlineKeyboard(
rows: [
[
Expand Down
1 change: 1 addition & 0 deletions scripts/tl2swift/Sources/TlParserLib/Parser/Parser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public final class Parser {
var paramName = scanner.scanUpTo(" ") ?? ""
paramName = paramName.trimmingCharacters(in: CharacterSet.at)
var paramDesc = scanner.scanUpTo("@") ?? ""
paramDesc = paramDesc.replacingOccurrences(of: "\n//-", with: " ")
paramDesc = paramDesc.trimmingCharacters(in: CharacterSet.comment)
result.params[paramName] = paramDesc
}
Expand Down

0 comments on commit 59751e4

Please sign in to comment.