         let expression = Expression(kind: .function(op.function, [operand]), range: range)
         
         let replacementRange = operandIndex ... operatorIndex
-        collapsedWrappers.replaceSubrange(replacementRange, with: [.Expression(expression)])
+        collapsedWrappers.replaceSubrange(replacementRange, with: [.expression(expression)])
         
         index = operandIndex
         return collapsedWrappers

                operatorIndex = operatorIndex - indexDelta
                operandIndex = operandIndex - 1
            } else {
                operandWrapper = .Expression(try expressionizeToken(t))
            }
        }
        

}

private enum TokenOrExpression {
    case token(GroupedToken)
    case expression(MathParser.Expression)
    
    var token: GroupedToken? {
        guard case .token(let t) = self else { return nil }
        return t
    }
    
    var expression: Expression? {
        guard case .expression(let e) = self else { return nil }
        return e
    }
    
// <rdar://problem/27805272> Segfault when compiling "Result" enum
//    var isToken: Bool { return token != nil }
    var isToken: Bool {
        if case .token(_) = self { return true }
        return false
    }
    
    var range: Range<Int> {
        switch self {
            case .token(let t): return t.range
            case .expression(let e): return e.range
        }
    }
}
