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

Side by Side Diff: experimental/PdfViewer/spec2def.py

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | gyp/pdfviewer.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/local/bin/python 1 #!/usr/local/bin/python
2 # coding: utf-8 2 # coding: utf-8
3 3
4 import sys 4 import sys
5 import re 5 import re
6 6
7 # TODO(edisonn): put processed part of file in a new file 7 # TODO(edisonn): put processed part of file in a new file
8 # put unprocessed part, in a new file, so we see what we miss 8 # put unprocessed part, in a new file, so we see what we miss
9 # keep blank lines, and generate a version without the blank lines 9 # keep blank lines, and generate a version without the blank lines
10 10
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 for line in sys.stdin: 614 for line in sys.stdin:
615 processLine(line) 615 processLine(line)
616 616
617 # close last table if it was not closed already 617 # close last table if it was not closed already
618 stopTable() 618 stopTable()
619 619
620 print 620 print
621 621
622 print 'def addDictionaryTypesTo(knowTypes):' 622 print 'def addDictionaryTypesTo(knowTypes):'
623 for e in tableToClassName: 623 for e in tableToClassName:
624 print(' knowTypes[\'' + tableToClassName[e][0] + '\'] = [\'SkPdf' + tableTo ClassName[e][0] + '*\', \'DictionaryFromDictionary2\', datatypes.CppNull(), \'re t->podofo()->GetDataType() == ePdfDataType_Dictionary\']') 624 print(' knowTypes[\'' + tableToClassName[e][0] + '\'] = [\'SkPdf' + tableTo ClassName[e][0] + '*\', \'' + tableToClassName[e][0] + 'FromDictionary\', dataty pes.CppNull(), \'ret->podofo()->GetDataType() == ePdfDataType_Dictionary\']')
625 print 625 print
626 print 626 print
627 627
628 628
629 #print lines 629 #print lines
630 fnewspec.close() 630 fnewspec.close()
631 631
632 if '__main__' == __name__: 632 if '__main__' == __name__:
633 sys.exit(generateDef()) 633 sys.exit(generateDef())
OLDNEW
« no previous file with comments | « experimental/PdfViewer/pdf_viewer_main.cpp ('k') | gyp/pdfviewer.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698