Skip to content

Commit

Permalink
Fix build error on older xcode
Browse files Browse the repository at this point in the history
  • Loading branch information
daltonclaybrook committed Dec 25, 2021
1 parent d14404f commit 7b8f387
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/NumberParser/Lexer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public struct Lexer {
}

private func makeHyphenatedNumberToken(prefix: String, cursor: inout Cursor) throws -> Token {
guard let prefix = DoubleDigitPrefix(rawValue: prefix) else {
guard let digitPrefix = DoubleDigitPrefix(rawValue: prefix) else {
throw LexerError.expectedWordToBeDoubleDigitPrefix(prefix)
}

Expand All @@ -99,6 +99,6 @@ public struct Lexer {
throw LexerError.expectedWordToBeDigit(suffix)
}

return .doubleDigitHyphenated(prefix, plus: digit)
return .doubleDigitHyphenated(digitPrefix, plus: digit)
}
}

0 comments on commit 7b8f387

Please sign in to comment.