Ignore:
Timestamp:
Sep 23, 2014, 12:47:34 PM (5 years ago)
Author:
cameron
Message:

Restructing.

File:
1 edited

Legend:

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

    r4183 r4186  
    6161
    6262   # printing
    63    def showC(self, name, indent = 4):
     63   def showC(self, indent = 4):
    6464      hex_specifier =  "%%#0%ix" % (quad_bits/4 + 2)
    6565      runtype = {-1:"Full", 0:"Empty", 1: "Mixed"}
    6666      formatted_runs = ['{%s, %i}' % (runtype[r[0]], r[1]) for r in self.runs]
    6767      formatted_quads = [hex_specifier % q for q in self.quads]
    68       setrep = (" " * indent) + ("%s.runs = {" % name)
    69       setrep += cformat.multiline_fill(formatted_runs, ',', indent)
    70       setrep += '};\n'
    71       setrep += (" " * indent) + ("%s.quads = {\n" % name)
    72       setrep += cformat.multiline_fill(formatted_quads, ',', indent)
    73       setrep += '};\n'
     68      setrep = (" " * indent) + "{{"
     69      setrep += cformat.multiline_fill(formatted_runs, ',', indent+2)
     70      setrep += '},\n'
     71      setrep += (" " * indent) + " {"
     72      setrep += cformat.multiline_fill(formatted_quads, ',', indent+2)
     73      setrep += '},\n'
     74      setrep += (" " * indent) + " %i}" % self.quad_count
    7475      return setrep
    7576
Note: See TracChangeset for help on using the changeset viewer.