示例#1
0
    def to_string(self):
        if not self.value:
            return 'null'

        unit = AnalysisUnit(self.value.dereference())
        filename = unit.filename
        return '<AnalysisUnit{}>'.format(' {}'.format(filename)
                                         if filename else '')
示例#2
0
 def unit(self):
     return AnalysisUnit(self.value['unit'])
示例#3
0
文件: printers.py 项目: briot/langkit
 def unit(self):
     return AnalysisUnit(tagged_field(self.value, 'unit'))