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

Unified Diff: sdk/lib/html/scripts/idlnode.py

Issue 11348382: Moving AudioElement back to dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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
Index: sdk/lib/html/scripts/idlnode.py
diff --git a/sdk/lib/html/scripts/idlnode.py b/sdk/lib/html/scripts/idlnode.py
index 3ce84d0b9f102285397a772c2ee834ceba0b0f0d..f5ba427fa0d9ec27e1457d47eb7cfdc11654ae91 100755
--- a/sdk/lib/html/scripts/idlnode.py
+++ b/sdk/lib/html/scripts/idlnode.py
@@ -3,6 +3,7 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
+import os
import sys
@@ -251,6 +252,10 @@ class IDLFile(IDLNode):
IDLNode.__init__(self, ast)
self.filename = filename
self.interfaces = self._convert_all(ast, 'Interface', IDLInterface)
+ # Treat the directory name as a module name.
+ module_name = os.path.split(os.path.dirname(self.filename))[1]
+ for interface in self.interfaces:
+ interface.module_name = module_name
modules = self._convert_all(ast, 'Module', IDLModule)
self.implementsStatements = self._convert_all(ast, 'ImplStmt',
IDLImplementsStatement)
@@ -267,6 +272,8 @@ class IDLModule(IDLNode):
self._convert_ext_attrs(ast)
self._convert_annotations(ast)
self.interfaces = self._convert_all(ast, 'Interface', IDLInterface)
+ for interface in self.interfaces:
+ interface.module_name = self.id
self.typeDefs = self._convert_all(ast, 'TypeDef', IDLTypeDef)
self.implementsStatements = self._convert_all(ast, 'ImplStmt',
IDLImplementsStatement)
@@ -381,12 +388,13 @@ class IDLInterface(IDLNode):
IDLNode.__init__(self, ast)
self._convert_ext_attrs(ast)
self._convert_annotations(ast)
+ self.module_name = None
self.parents = self._convert_all(ast, 'ParentInterface',
IDLParentInterface)
javascript_interface_name = self.ext_attrs.get('InterfaceName', self.id)
self.javascript_binding_name = javascript_interface_name
self.doc_js_name = javascript_interface_name
- self.operations = self._convert_all(ast, 'Operation',
+ self.operations = self._convert_all(ast, 'Operation',
lambda ast: IDLOperation(ast, self.doc_js_name))
self.attributes = self._convert_all(ast, 'Attribute',
lambda ast: IDLAttribute(ast, self.doc_js_name))

Powered by Google App Engine
This is Rietveld 408576698