Project

General

Profile

Feature #18242 ยป and-or-masgn-18242.diff

jeremyevans0 (Jeremy Evans), 10/06/2021 04:23 PM

View differences:

parse.y
1743 1743
		    {
1744 1744
			$$ = logop(p, idAND, $1, $3, &@2, &@$);
1745 1745
		    }
1746
		| expr keyword_and mlhs '=' lex_ctxt mrhs_arg
1747
		    {
1748
			$$ = logop(p, idAND, $1, node_assign(p, $3, $6, $5, &@3), &@2, &@$);
1749
		    }
1750
		| expr keyword_and mlhs '=' lex_ctxt command_call
1751
		    {
1752
			$$ = logop(p, idAND, $1, node_assign(p, $3, $6, $5, &@3), &@2, &@$);
1753
		    }
1746 1754
		| expr keyword_or expr
1747 1755
		    {
1748 1756
			$$ = logop(p, idOR, $1, $3, &@2, &@$);
1749 1757
		    }
1758
		| expr keyword_or mlhs '=' lex_ctxt mrhs_arg
1759
		    {
1760
			$$ = logop(p, idOR, $1, node_assign(p, $3, $6, $5, &@3), &@2, &@$);
1761
		    }
1762
		| expr keyword_or mlhs '=' lex_ctxt command_call
1763
		    {
1764
			$$ = logop(p, idOR, $1, node_assign(p, $3, $6, $5, &@3), &@2, &@$);
1765
		    }
1750 1766
		| keyword_not opt_nl expr
1751 1767
		    {
1752 1768
			$$ = call_uni_op(p, method_cond(p, $3, &@3), METHOD_NOT, &@1, &@$);