Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/WebKit/Source/bindings/scripts/idl_types.py

Issue 2142773002: IDL: Add is_array and is_sequence properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/scripts/idl_types.py
diff --git a/third_party/WebKit/Source/bindings/scripts/idl_types.py b/third_party/WebKit/Source/bindings/scripts/idl_types.py
index 67edb06898dc0a5456856db49e41b9cc36be6a3a..b5933322a3bb6100db9f885726f10242449d0712 100644
--- a/third_party/WebKit/Source/bindings/scripts/idl_types.py
+++ b/third_party/WebKit/Source/bindings/scripts/idl_types.py
@@ -363,6 +363,14 @@ class IdlArrayOrSequenceType(IdlTypeBase):
return True
@property
+ def is_array_type(self):
+ return False
+
+ @property
+ def is_sequence_type(self):
+ return False
+
+ @property
def is_frozen_array(self):
return False
@@ -391,6 +399,10 @@ class IdlArrayType(IdlArrayOrSequenceType):
def name(self):
return self.element_type.name + 'Array'
+ @property
+ def is_array_type(self):
+ return True
+
class IdlSequenceType(IdlArrayOrSequenceType):
def __init__(self, element_type):
@@ -403,6 +415,10 @@ class IdlSequenceType(IdlArrayOrSequenceType):
def name(self):
return self.element_type.name + 'Sequence'
+ @property
+ def is_sequence_type(self):
+ return True
+
class IdlFrozenArrayType(IdlArrayOrSequenceType):
def __init__(self, element_type):
@@ -420,7 +436,6 @@ class IdlFrozenArrayType(IdlArrayOrSequenceType):
return True
-
################################################################################
# IdlNullableType
################################################################################
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698