Exemplo n.º 1
0
 def show(self, depth = 0, types = False):
   ASTUtils.println('ASTBinary, operator: {0} {1}'.format(self.operator,
       ASTUtils.type_string(self.expr_type, types)), depth)
   ASTUtils.println('Left operand:', depth)
   self.children[0].show(depth + 1, types)
   ASTUtils.println('Right operand:', depth)
   self.children[1].show(depth + 1, types)
Exemplo n.º 2
0
 def show(self, depth = 0, types = False):
   ASTUtils.println('ASTClassInstanceCreation {0}'.format(
       ASTUtils.type_string(self.expr_type)), depth)
   ASTUtils.println('Class type:', depth)
   self.children[0].show(depth + 1, types)
   for i, x in enumerate(self.children[1]):
     ASTUtils.println('Argument {0}:'.format(str(i)), depth)
     x.show(depth + 1, types)
Exemplo n.º 3
0
 def show(self, depth = 0, types = False):
   ASTUtils.println('ASTMethodInvocation {0}'.format(
       ASTUtils.type_string(self.expr_type, types)), depth)
   if len(self.children[0]) == 1:
     ASTUtils.println('Method identifiers:', depth)
     self.children[0][0].show(depth + 1, types=False)
   else:
     ASTUtils.println('Expression:', depth)
     self.children[0][0].show(depth + 1, types)
     ASTUtils.println('Field access from expression:', depth)
     self.children[0][1].show(depth + 1, types=False)
   for i, x in enumerate(self.children[1]):
     ASTUtils.println('Argument {0}:'.format(str(i)), depth)
     x.show(depth + 1, types)
Exemplo n.º 4
0
 def show(self, depth = 0, types = False):
   ASTUtils.println('ASTIdentifiers: {0} {1}'.format(str(self),
       ASTUtils.type_string(self.expr_type, types)), depth)
Exemplo n.º 5
0
 def show(self, depth = 0, types = False):
   ASTUtils.println(
       'ASTInstanceOf Type: {0} {1}'.format(str(self.type_node),
           ASTUtils.type_string(self.expr_type)), depth)
   self.children[0].show(depth + 1, types)
Exemplo n.º 6
0
 def show(self, depth = 0, types = False):
   ASTUtils.println('ASTThis {0}'.format(ASTUtils.type_string(
       self.expr_type)), depth)
Exemplo n.º 7
0
 def show(self, depth = 0, types = False):
   ASTUtils.println(
       'Literal of type {0}: {1} {2}'.format(self.literal_type,
       self.children[0], ASTUtils.type_string(self.expr_type, types)), depth)
Exemplo n.º 8
0
 def show(self, depth = 0, types = False):
   ASTUtils.println(
     'ASTFieldAccess {0}'.format(ASTUtils.type_string(self.expr_type, types)),
     depth)
   self.children[0].show(depth + 1, types)
   self.children[1].show(depth + 1, False)