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

Unified Diff: ppapi/generators/apps_example.py

Issue 9359040: WIP IDL-IPC2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Checkpoint before going back to returning ListValue via ExtensionMsg_Response. Created 8 years, 10 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 | « ppapi/generators/apiidlc.py ('k') | ppapi/generators/idl_lexer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/apps_example.py
diff --git a/ppapi/generators/apps_example.py b/ppapi/generators/apps_example.py
new file mode 100755
index 0000000000000000000000000000000000000000..23fe104beb17e833932c05a2f49a2d9437e564f3
--- /dev/null
+++ b/ppapi/generators/apps_example.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import sys
+
+from idl_option import ParseOptions
+from idl_parser import IDLParser
+
+def Main():
+ filenames = ParseOptions(sys.argv[1:])
+ for filename in filenames:
+ f = open(filename, "r")
+ content = f.read()
+ f.close()
+ parser = IDLParser()
+ result = parser.ParseData(content, filename)
+ if not result:
+ print "No results - bailing out."
+ return
+ index = 1
+ for node in result:
+ print "-------------------- Node %d --------------------" % index
+ index += 1
+ print "Node class: '%s'\n" % node.cls
+ if not hasattr(node, 'Dump'):
+ print " No Dump function - skipping"
+ continue
+ node.Dump()
+
+
+if __name__ == '__main__':
+ sys.exit(Main())
« no previous file with comments | « ppapi/generators/apiidlc.py ('k') | ppapi/generators/idl_lexer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698