             
             // e.g. Orb::Core::Types::Int gets translated to Orb.Core.Types.Int
             // This is for LLVM. We should eventually support custom manglers
+            
             return TypeIdentifierExpression(value: token.value.replacingOccurrences(of: "::", with: "."))
         }
         

    }
}

public class TypeIdentifierExpression : TypedExpression, ValueExpression, RValueExpression {
    public typealias ValueType = String
    
    public let hashValue: Int = nextHashValue()
    
    fileprivate(set) public var value: String
    public var grouped: Bool

    public func dump() -> String {
        return self.grouped ? "(\(self.value))" : self.value
    }
    
    public func absolutise(absoluteName: String) {
        if !self.absolutised {
            self.value = absoluteName
            self.absolutised = true
        }
    }
}

public class ListTypeIdentifierExpression : TypeIdentifierExpression {
    private(set) public var elementType: TypeIdentifierExpression
    
    init(grouped: Bool = false, elementType: TypeIdentifierExpression) {
        self.elementType = elementType
        super.init(value: elementType.value, grouped: grouped)
    }
    
    public override func absolutise(absoluteName: String) {
        self.elementType.absolutise(absoluteName: absoluteName)
    }
}

public class PairExpression : NamedExpression, TypedExpression, AbsoluteNameAware {
    public let name: IdentifierExpression
    private(set) public var type: TypeIdentifierExpression
    
    public var absolutised: Bool = false
    
    public let hashValue: Int = nextHashValue()
    
    init(name: IdentifierExpression, type: TypeIdentifierExpression) {
        self.name = name
        self.type = type
    }
    
    public func absolutise(absoluteName: String) {
        if !self.absolutised {
            self.type.absolutise(absoluteName: absoluteName)
            self.absolutised = true
        }
    }
}

public protocol LiteralExpression {}
