Chromium Code Reviews

Unified Diff: tools/idl_parser/idl_parser.py

Issue 329163002: IDL parser: implement Stringifier production (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | tools/idl_parser/test_parser/interface_web.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/idl_parser/idl_parser.py
diff --git a/tools/idl_parser/idl_parser.py b/tools/idl_parser/idl_parser.py
index 8a682ea688b6821d8993f8c52c8e9dcf6b78cc44..bba12b1912a4e0ff3169008c74fd7fa710d1f13c 100755
--- a/tools/idl_parser/idl_parser.py
+++ b/tools/idl_parser/idl_parser.py
@@ -437,7 +437,7 @@ class IDLParser(object):
| Attribute
| Operation"""
if len(p) > 2:
- p[0] = p[2]
+ p[0] = self.BuildProduction('Stringifier', p, 1, ListFromConcat(p[2]))
Jens Widell 2014/06/11 15:28:51 Modifying p_AttributeOrOperation() like this is sl
Nils Barth (inactive) 2014/06/12 04:20:27 This is fine; we only override this b/c we want to
else:
p[0] = p[1]
@@ -447,9 +447,9 @@ class IDLParser(object):
| OperationRest
| ';'"""
if p[1] == ';':
- p[0] = self.BuildAttribute('STRINGIFIER', Boolean(True))
+ p[0] = None
else:
- p[0] = ListFromConcat(self.BuildAttribute('STRINGIFIER', p[1]), p[1])
+ p[0] = p[1]
# [32]
def p_Attribute(self, p):
« no previous file with comments | « no previous file | tools/idl_parser/test_parser/interface_web.idl » ('j') | no next file with comments »

Powered by Google App Engine