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

Side by Side Diff: ppapi/generators/apps_example.py

Issue 9388002: Add support for Chrome Apps to IDL lexer/parser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed reduce conflicts and allowed use of callback as identifier 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import sys
7
8 from idl_option import ParseOptions
9 from idl_parser import IDLParser
10
11 def Main():
12 filenames = ParseOptions(sys.argv[1:])
13 for filename in filenames:
14 print "parsing %s" % filename
15 f = open(filename, "r")
16 content = f.read()
17 f.close()
18 parser = IDLParser()
19 result = parser.ParseData(content, filename)
20 if not result:
21 print "No results - bailing out."
22 return
23 index = 1
24 for node in result:
25 print "-------------------- Node %d --------------------" % index
26 index += 1
27 print "Node class: '%s'\n" % node.cls
28 if not hasattr(node, 'Dump'):
29 print " No Dump function - skipping"
30 continue
31 node.Dump(comments=True)
32
33
34 if __name__ == '__main__':
35 sys.exit(Main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698