コード例 #1
0
ファイル: template.py プロジェクト: mahongquan/java2python
 def __repr__(self):
     """ Returns the debug string representation of this template. """
     name = colors.white('name:') + colors.cyan(self.name) if self.name else ''
     parts = [colors.green(self.typeName), name]
     if self.type:
         parts.append(colors.white('type:') + colors.cyan(self.type))
     if self.modifiers:
         parts.append(colors.white('modifiers:') + colors.cyan(','.join(self.modifiers)))
     return ' '.join(parts)
コード例 #2
0
ファイル: template.py プロジェクト: techball2033/Java2Python
 def __repr__(self):
     """ Returns the debug string representation of this template. """
     name = colors.white('name:') + colors.cyan(self.name) if self.name else ''
     parts = [colors.green(self.typeName), name]
     if self.type:
         parts.append(colors.white('type:') + colors.cyan(self.type))
     if self.modifiers:
         parts.append(colors.white('modifiers:') + colors.cyan(','.join(self.modifiers)))
     return ' '.join(parts)
コード例 #3
0
ファイル: template.py プロジェクト: h3xh4wk/java2python
 def __repr__(self):
     """ Returns the debug string representation of this statement. """
     parts = [
         colors.green(self.typeName),
         colors.white('keyword:') + colors.cyan(self.keyword)
     ]
     return ' '.join(parts)
コード例 #4
0
ファイル: template.py プロジェクト: mahongquan/java2python
 def __repr__(self):
     """ Returns the debug string representation of this template. """
     parts, parent, showfs = [colors.blue(self.typeName)], self.parent, True
     if isinstance(self.left, (basestring, )) and self.left:
         parts.append(colors.white('left:') + colors.yellow(self.left))
         showfs = False
     if isinstance(self.right, (basestring, )) and self.right:
         parts.append(colors.white('right:') + colors.yellow(self.right))
         showfs = False
     if self.modifiers:
         parts.append(colors.white('modifiers:') + colors.cyan(','.join(self.modifiers)))
     if self.type:
         parts.append(colors.white('type:') + colors.cyan(self.type))
     if showfs:
         parts.append(colors.white('format:') + colors.yellow(self.fs))
     if self.tail:
         parts.append(colors.white('tail:') + colors.black(self.tail))
     return ' '.join(parts)
コード例 #5
0
ファイル: template.py プロジェクト: techball2033/Java2Python
 def __repr__(self):
     """ Returns the debug string representation of this template. """
     parts, parent, showfs = [colors.blue(self.typeName)], self.parent, True
     if isinstance(self.left, (basestring, )) and self.left:
         parts.append(colors.white('left:') + colors.yellow(self.left))
         showfs = False
     if isinstance(self.right, (basestring, )) and self.right:
         parts.append(colors.white('right:') + colors.yellow(self.right))
         showfs = False
     if self.modifiers:
         parts.append(colors.white('modifiers:') + colors.cyan(','.join(self.modifiers)))
     if self.type:
         parts.append(colors.white('type:') + colors.cyan(self.type))
     if showfs:
         parts.append(colors.white('format:') + colors.yellow(self.fs))
     if self.tail:
         parts.append(colors.white('tail:') + colors.black(self.tail))
     return ' '.join(parts)
コード例 #6
0
ファイル: test_all.py プロジェクト: dcronkite/java2python
 def shortDescription(self):
     fs = 'Description: {}\nSelector: {}\n'
     args = (colors.cyan(self.description), colors.yellow(self.selector))
     return fs.format(*args)
コード例 #7
0
ファイル: test_all.py プロジェクト: 117083024/java2python
 def shortDescription(self):
     fs = 'Description: {}\nSelector: {}\n'
     args = (colors.cyan(self.description), colors.yellow(self.selector))
     return fs.format(*args)
コード例 #8
0
ファイル: template.py プロジェクト: mahongquan/java2python
 def __repr__(self):
     """ Returns the debug string representation of this statement. """
     parts = [colors.green(self.typeName), colors.white('keyword:')+colors.cyan(self.keyword)]
     return ' '.join(parts)