         var pctEncoded = ""
         var expression = ""
         var expressionCount = 0
-        var syntaxErrors = Array<(URITemplateError, Int)>()
+        var errors = Array<(URITemplateError, Int)>()
 
         for (index, c) in enumerate(template) {
             switch state {

                            pctEncoded = ""

                        } else {
                            syntaxErrors += (URITemplateError.MalformedPctEncodedInLiteral, index)
                            result += encodeLiteralString(pctEncoded)
                            result += encodeLiteralCharacter(c)
                            state = .ScanningLiteral


import Foundation

/*!
* @abstract
* Expand a URITemplate
*
* @dicussion
* This is a convenient version of the `process` method in class `URITemplate`
*
* @param template
* The URITemplate to expand
*
* @param values
* The object to provide values when the function expands the URI Template.
* It can be a Swift Dictionary, a NSDictionary, a NSDictionary subclass or any
* object has method `objectForKey`.
*
* @result
* The expanded URITemplate
*/
public func ExpandURITemplate(template: String, values: AnyObject? = nil) -> String {
    var provider: AnyObject? = values
    if !provider {
        provider = Dictionary<String, AnyObject>()
    }
    let (URLString, errors) = URITemplate.process(template, values: provider!);
    return URLString
}

public enum URITemplateError {
    case MalformedPctEncodedInLiteral
    case NonLiteralsCharacterFoundInLiteral
