mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 895728 part 1. Introduce "boolean" and "numeric" types, since those will be treated differently for purposes of distinguishability and overload resolution. r=khuey
This commit is contained in:
parent
1b619da690
commit
a3425171f3
@ -1257,6 +1257,12 @@ class IDLType(IDLObject):
|
||||
def isPrimitive(self):
|
||||
return False
|
||||
|
||||
def isBoolean(self):
|
||||
return False
|
||||
|
||||
def isNumeric(self):
|
||||
return False
|
||||
|
||||
def isString(self):
|
||||
return False
|
||||
|
||||
@ -1411,6 +1417,12 @@ class IDLNullableType(IDLType):
|
||||
def isPrimitive(self):
|
||||
return self.inner.isPrimitive()
|
||||
|
||||
def isBoolean(self):
|
||||
return self.inner.isBoolean()
|
||||
|
||||
def isNumeric(self):
|
||||
return self.inner.isNumeric()
|
||||
|
||||
def isString(self):
|
||||
return self.inner.isString()
|
||||
|
||||
@ -1805,6 +1817,12 @@ class IDLTypedefType(IDLType, IDLObjectWithIdentifier):
|
||||
def isPrimitive(self):
|
||||
return self.inner.isPrimitive()
|
||||
|
||||
def isBoolean(self):
|
||||
return self.inner.isBoolean()
|
||||
|
||||
def isNumeric(self):
|
||||
return self.inner.isNumeric()
|
||||
|
||||
def isString(self):
|
||||
return self.inner.isString()
|
||||
|
||||
@ -2084,6 +2102,12 @@ class IDLBuiltinType(IDLType):
|
||||
def isPrimitive(self):
|
||||
return self._typeTag <= IDLBuiltinType.Types.double
|
||||
|
||||
def isBoolean(self):
|
||||
return self._typeTag == IDLBuiltinType.Types.boolean
|
||||
|
||||
def isNumeric(self):
|
||||
return self.isPrimitive() and not self.isBoolean()
|
||||
|
||||
def isString(self):
|
||||
return self._typeTag == IDLBuiltinType.Types.domstring or \
|
||||
self._typeTag == IDLBuiltinType.Types.bytestring
|
||||
|
Loading…
Reference in New Issue
Block a user