| OLD | NEW |
| 1 | 1 |
| 2 | 2 |
| 3 import sys | 3 import sys |
| 4 | 4 |
| 5 import datatypes | 5 import datatypes |
| 6 from autogen.pdfspec_autogen import * | 6 from autogen.pdfspec_autogen import * |
| 7 | 7 |
| 8 knowTypes = { | 8 knowTypes = { |
| 9 '(any)': ['SkPdfObject*', 'ObjectFromDictionary', datatypes.CppNull(), 'true'], | 9 '(any)': ['SkPdfObject*', 'ObjectFromDictionary', datatypes.CppNull(), 'true'], |
| 10 '(undefined)': ['SkPdfObject*', 'ObjectFromDictionary', datatypes.CppNull(), 'tr
ue'], | 10 '(undefined)': ['SkPdfObject*', 'ObjectFromDictionary', datatypes.CppNull(), 'tr
ue'], |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 self.fEnumValues = enumValues | 55 self.fEnumValues = enumValues |
| 56 return self | 56 return self |
| 57 | 57 |
| 58 def name(self, name): | 58 def name(self, name): |
| 59 self.fCppName = name | 59 self.fCppName = name |
| 60 return self | 60 return self |
| 61 | 61 |
| 62 def type(self, types): | 62 def type(self, types): |
| 63 # TODO (edisonn): if simple type, use it, otherwise set it to Dictionary, an
d set a mask for valid types, like array or name | 63 # TODO (edisonn): if simple type, use it, otherwise set it to Dictionary, an
d set a mask for valid types, like array or name |
| 64 types = types.strip() | 64 types = types.strip() |
| 65 types = types.replace('or', ' ') | 65 types = types.replace(' or ', ' ') |
| 66 types = types.replace(' or,', ' ') |
| 67 types = types.replace(',or ', ' ') |
| 68 types = types.replace(',or,', ' ') |
| 66 types = types.replace(',', ' ') | 69 types = types.replace(',', ' ') |
| 67 types = types.replace('text', ' ') # TODO(edisonn): what is the difference b
etween 'text string' and 'string'? | 70 types = types.replace('text', ' ') # TODO(edisonn): what is the difference b
etween 'text string' and 'string'? |
| 68 types = types.replace('file specification', 'file_specification') | 71 types = types.replace('file specification', 'file_specification') |
| 69 | 72 |
| 70 | 73 |
| 71 self.fTypes = types | 74 self.fTypes = types |
| 72 return self | 75 return self |
| 73 | 76 |
| 74 def comment(self, comment): | 77 def comment(self, comment): |
| 75 self.fComment = comment | 78 self.fComment = comment |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 | 620 |
| 618 fileHeaders.write('#endif // __DEFINED__SkPdfHeaders\n') | 621 fileHeaders.write('#endif // __DEFINED__SkPdfHeaders\n') |
| 619 fileHeaders.close() | 622 fileHeaders.close() |
| 620 fileHeadersCpp.close() | 623 fileHeadersCpp.close() |
| 621 | 624 |
| 622 return 1 | 625 return 1 |
| 623 | 626 |
| 624 if '__main__' == __name__: | 627 if '__main__' == __name__: |
| 625 sys.exit(generateCode()) | 628 sys.exit(generateCode()) |
| 626 | 629 |
| OLD | NEW |