示例#1
0
   def __init__(self, identifier_=None, operatorSymbol_=None):
      assert identifier_ or operatorSymbol_

      Node.__init__(self, *_extents(identifier_ or operatorSymbol_))

      # XXX this can possibly be simplified.
      self.children["identifier"] = identifier_
      self.children["operatorSymbol"] = operatorSymbol_
示例#2
0
   def __init__(self,
                subprogramSpec_, is_, optSubprogramDeclPart_,
                begin_, statements_, end_, optDesignator_, semiColon_):
      Node.__init__(self, *_extents(subprogramSpec_, semiColon_))

      # XXX simplify the optSubprogramDeclPart in the AST
      # remove it from the visitors.

      self.children["subprogramSpec"] = subprogramSpec_
      self.children["optSubprogramDeclPart"] = optSubprogramDeclPart_
      self.children["statements"] = statements_
      self.children["optDesignator"] = optDesignator_
示例#3
0
   def __init__(self, subprogramBody_):
      Node.__init__(self, *_extents(subprogramBody_)) # XXX this will change.

      self.children["subprogramBody"] = subprogramBody_
      self.types = {}
示例#4
0
   def __init__(self, putLine_, parenL_, stringLit_, parenR_, semiColon_):
      Node.__init__(self, *_extents(putLine_, semiColon_))

      # XXX need to handle more than just string literals.
      self.children["stringLit"] = stringLit_
示例#5
0
   def __init__(self, designator_=None):
      Node.__init__(self, *_extents(designator_))

      self.children["designator"] = designator_
示例#6
0
   def __init__(self, printStmt_):
      # XXX this needs to be fixed to take a generic list of statements.
      Node.__init__(self, *_extents(printStmt_))

      self.children["printStmt"] = printStmt_
示例#7
0
   def __init__(self, procedure_, identifier_):
      Node.__init__(self, *_extents(procedure_, identifier_))

      self.children["identifier"] = identifier_