Example #1
0
 def __str__(self):
     ret = "cargotable {\n"
     ret += ", ".join([
         expression.identifier_to_print(cargo.value)
         for cargo in self.cargo_list
     ])
     ret += "\n}\n"
     return ret
Example #2
0
    def __str__(self):
        lines = []
        for tracktype in self.tracktype_list:
            if isinstance(tracktype, assignment.Assignment):
                ids = [
                    expression.identifier_to_print(v.value)
                    for v in tracktype.value
                ]
                lines.append("{}: [{}]".format(str(tracktype.name),
                                               ", ".join(ids)))
            else:
                lines.append(expression.identifier_to_print(tracktype.value))

        ret = self.track_kind + "typetable {\n    "
        ret += ", ".join(lines)
        ret += "\n}\n"
        return ret
Example #3
0
 def __str__(self):
     ret = 'tramtypetable {\n'
     ret += ', '.join([
         expression.identifier_to_print(tramtype.value)
         for tramtype in self.tramtype_list
     ])
     ret += '\n}\n'
     return ret