Пример #1
0
 def p_expr_noin(self, p):
     """expr_noin : assignment_expr_noin
                  | expr_noin COMMA assignment_expr_noin
     """
     if len(p) == 2:
         p[0] = p[1]
     else:
         p[0] = ast.Comma(left=p[1], right=p[3])
Пример #2
0
 def p_expr_nobf(self, p):
     """expr_nobf : assignment_expr_nobf
                  | expr_nobf COMMA assignment_expr
     """
     if len(p) == 2:
         p[0] = p[1]
     else:
         p[0] = ast.Comma(left=p[1], right=p[3],lineno=p.lineno(1))
Пример #3
0
 def p_expr(self, p):
     """expr : assignment_expr
             | expr COMMA assignment_expr
     """
     if len(p) == 2:
         p[0] = p[1]
     else:
         p[0] = ast.Comma(left=p[1], right=p[3])