         }
         let nameToken = tokens[consumedIndex]
         consumedIndex = tokens.index(after: consumedIndex)
-        return (consumedIndex, BaseTypeContext(name: nameToken))
+        return (consumedIndex, BaseTypeContext(name: nameToken, tokens: tokens.subarray(range: Range(uncheckedBounds: (contextStart, consumedIndex)))))
     }
 }
 
 struct GenericTypeContext: ParserContext {
     let array: ArrayGenericTypeContext?
     let dict: DictGenericTypeContext?
+    
+    let tokens: [RecognizedToken]
+    var text: String {
+        get {
+            return tokens.reduce("") { (soFar, soGood) in
+                return soFar + soGood.string
+            }
+        }
+    }
     
     static func consume(tokens: [RecognizedToken]) throws -> (consumedIndex: Array<RecognizedToken>.Index, context: GenericTypeContext) {
         let contextStart = skipNLAndWS(tokens: tokens, from: tokens.startIndex)

    let SLASH: RecognizedToken
    let identifier: IdentifierContext?
    let param: ParamInUriContext?
    
    static func consume(tokens: [RecognizedToken]) throws -> (consumedIndex: Array<RecognizedToken>.Index, context: URIPathComponentContext) {
        let contextStart = skipNLAndWS(tokens: tokens, from: tokens.startIndex)

            baseType = nil
        }
        guard baseType == nil else {
            return (consumedIndex, NonGenericTypeContext(baseType: baseType, customType: nil, tokens: tokens.subarray(range: Range(uncheckedBounds: (contextStart, consumedIndex)))))
        }
        let (customTypeConsumed, customTypeContext) = try IdentifierContext.consume(tokens: tokens)
        consumedIndex = tokens.index(consumedIndex, offsetBy: customTypeConsumed)
        return (consumedIndex, NonGenericTypeContext(baseType: nil, customType: customTypeContext, tokens: tokens.subarray(range: Range(uncheckedBounds: (contextStart, consumedIndex)))))
    }
}

