Пример #1
0
 def __init__(self, expr):
     Statement.__init__(self, "WriteStatement")
     self._kids = [expr]
Пример #2
0
 def __init__(self, v):
     Statement.__init__(self, "ReadStatement")
     self._kids.append(v)
Пример #3
0
 def __init__(self, expr, thenPart, elsePart):
     Statement.__init__(self, "IfStatement")
     # _kids[0] = expr
     # _kids[1] = thenPart
     # _kids[2] = elsePart
     self._kids = [expr, thenPart, elsePart]
Пример #4
0
 def __init__(self, v, expr):
     Statement.__init__(self, "AssignmentStatement")
     self._kids = [v, expr]