Changeset 4188 for proto


Ignore:
Timestamp:
Sep 23, 2014, 5:18:56 PM (5 years ago)
Author:
cameron
Message:

Generate enumerated property value data in correct order; identify missing values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/charsetcompiler/UCD/UCD_properties.py

    r4186 r4188  
    309309           canonical_property_value_map = self.property_value_lookup_map[property_code]
    310310           (prop_values, value_map) = parse_UCD_codepoint_name_map(filename_root + '.txt', canonical_property_value_map)
     311           for v in self.property_value_list[property_code]:
     312              if not v in prop_values:
     313                 #raise Exception("Property %s value %s missing" % (self.full_name_map[property_code], v))
     314                 print("Property %s value %s missing" % (self.full_name_map[property_code], v))
     315                 value_map[v] = empty_uset()
    311316           basename = os.path.basename(filename_root)
    312317           f = cformat.open_header_file_for_write(os.path.basename(filename_root))
     
    315320           print "%s: %s bytes" % (basename, sum([value_map[v].bytes() for v in value_map.keys()]))
    316321           f.write("  namespace %s {\n" % property_code.upper())
    317            for v in prop_values:
     322           for v in self.property_value_list[property_code]:
    318323             f.write("    const UnicodeSet %s_Set \n" % v.lower())
    319324             f.write(value_map[v].showC(6) + ";\n")
    320            set_list = ['%s_Set' % v.lower() for v in prop_values]
     325           set_list = ['%s_Set' % v.lower() for v in self.property_value_list[property_code]]
    321326           f.write("    const EnumeratedPropertyObject property_object\n")
    322327           f.write("      {%s,\n" % property_code)
Note: See TracChangeset for help on using the changeset viewer.