def Expr(self, p):
     return Statement.AssignmentStatement(Expression.IdentifierExpression(p[0]), p[2])
Beispiel #2
0
 def get_assignment(self):
     var = self.get_id()
     tok = self.lex.get_next_token()
     self.match(tok, TokenType.ASSIGN_TOK)
     expr = self.get_expression()
     return Statement.AssignmentStatement(var, expr)