Skip to content

[pkgconfig] fix typos #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Sources/Build/PkgConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ struct PkgConfigParser {
let value = line[equalsIndex.successor()..<line.endIndex]
variables[name] = try resolveVariables(value)
} else {
// Unexpected thing in the pc file, abort.
// unexpected thing in the pc file, abort.
throw PkgConfigError.ParsingError("Unexpecting line: \(line) in \(pcFile)")
}
}
Expand All @@ -126,11 +126,11 @@ struct PkgConfigParser {
}

/// Parses `Requires: ` string into array of dependencies.
/// The dependecy string has seperator which can be (multiple) space or a comma.
/// The dependency string has seperator which can be (multiple) space or a comma.
/// Additionally each there can be an optional version constaint to a dependency.
private func parseDependencies(_ depString: String) throws -> [String] {
let operators = ["=", "<", ">", "<=", ">="]
let seperators = [" ", ","]
let separators = [" ", ","]

// Look at a char at an index if present.
func peek(idx: Int) -> Character? {
Expand All @@ -145,7 +145,7 @@ struct PkgConfigParser {
var token = ""
for (idx, char) in depString.characters.enumerated() {
// Encountered a seperator, use the token.
if seperators.contains(String(char)) {
if separators.contains(String(char)) {
// If next character is a space skip.
if let peeked = peek(idx: idx+1) where peeked == " " { continue }
// Append to array of tokens and reset token variable.
Expand Down