Index: ppapi/generators/idl_parser.py |
diff --git a/ppapi/generators/idl_parser.py b/ppapi/generators/idl_parser.py |
index df330702a501288a7d397f98cd1d8a0ab1a251d8..0b92d969ccf5756951d83559261c8ba9b1554f05 100755 |
--- a/ppapi/generators/idl_parser.py |
+++ b/ppapi/generators/idl_parser.py |
@@ -268,6 +268,16 @@ class IDLParser(IDLLexer): |
if self.parse_debug: DumpReduction('modifiers', p) |
# |
+# Type reference (with an optional namespace). |
+# |
+# |
+ def p_typeref(self, p): |
+ """typeref : SYMBOL |
noelallen_use_chromium
2014/03/13 16:31:05
This does not appear to be recursive. It only sup
mtomasz
2014/03/14 00:36:44
Done.
Nils Barth (inactive)
2014/03/14 00:41:45
Good point! (>.<)
Actually, this grammar rule is
Nils Barth (inactive)
2014/03/14 00:52:11
Discussed offline; syntactically they're the same,
|
+ | SYMBOL '.' SYMBOL""" |
+ p[0] = "".join(p[1:]) |
Nils Barth (inactive)
2014/03/13 07:24:54
Style: '' (single quotes in Python).
mtomasz
2014/03/14 00:36:44
Done.
|
+ if self.parse_debug: DumpReduction('typeref', p) |
+ |
+# |
# Comments |
# |
# Comments are optional list of C style comment objects. Comments are returned |
@@ -600,7 +610,7 @@ class IDLParser(IDLLexer): |
if self.parse_debug: DumpReduction('param_list', p) |
def p_param_item(self, p): |
- """param_item : modifiers optional SYMBOL arrays identifier""" |
+ """param_item : modifiers optional typeref arrays identifier""" |
typeref = self.BuildAttribute('TYPEREF', p[3]) |
children = ListFromConcat(p[1], p[2], typeref, p[4]) |
p[0] = self.BuildNamed('Param', p, 5, children) |
@@ -732,14 +742,14 @@ class IDLParser(IDLLexer): |
# A member attribute or function of a struct or interface. |
# |
def p_member_attribute(self, p): |
- """member_attribute : modifiers SYMBOL arrays questionmark identifier""" |
+ """member_attribute : modifiers typeref arrays questionmark identifier""" |
typeref = self.BuildAttribute('TYPEREF', p[2]) |
children = ListFromConcat(p[1], typeref, p[3], p[4]) |
p[0] = self.BuildNamed('Member', p, 5, children) |
if self.parse_debug: DumpReduction('attribute', p) |
def p_member_function(self, p): |
- """member_function : modifiers static SYMBOL arrays SYMBOL param_list""" |
+ """member_function : modifiers static typeref arrays SYMBOL param_list""" |
typeref = self.BuildAttribute('TYPEREF', p[3]) |
children = ListFromConcat(p[1], p[2], typeref, p[4], p[6]) |
p[0] = self.BuildNamed('Member', p, 5, children) |