def p_expr_old(p: Any) -> None: 'expr : OLD LPAREN expr RPAREN' p[0] = syntax.UnaryExpr(p.slice[1], 'OLD', p[3])
def p_expr_not(p: Any) -> None: 'expr : BANG expr' p[0] = syntax.UnaryExpr(p.slice[1], 'NOT', p[2])
def p_expr_old(p: Any) -> None: 'expr : OLD LPAREN expr RPAREN' e: syntax.Expr = p[3] p[0] = syntax.UnaryExpr('OLD', e, span=loc_join(p.slice[1], p.slice[4]))
def p_expr_new(p: Any) -> None: 'expr : NEW LPAREN expr RPAREN' e: syntax.Expr = p[3] p[0] = syntax.UnaryExpr('NEW', e, span=loc_join(p.slice[1], p.slice[4]))
def p_expr_not(p: Any) -> None: '''expr : BANG expr | TILDE expr''' expr: syntax.Expr = p[2] p[0] = syntax.UnaryExpr('NOT', expr, span=loc_join(p.slice[1], expr.span))