Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR supports right hand assignment for Ruby 2.8.0-dev (Ruby 3.0). whitequark/parser#682 ## `mrasgn` vs `masgn` `mrasgn` has the same structure as `masgn` except that the child nodes are reversed. So this PR adds `mrasgn` to the same constant as `masgn`. ### `mrasign` ```console % ruby-parse -e '13.divmod(5) => a, b' warning: parser/current is loading parser/ruby28, which recognizes warning: 2.8.0-dev-compliant syntax, but you are running 2.8.0. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. (mrasgn (send (int 13) :divmod (int 5)) (mlhs (lvasgn :a) (lvasgn :b))) ``` ### `masign` ```console % ruby-parse -e 'a, b = 13.divmod(5)' warning: parser/current is loading parser/ruby28, which recognizes warning: 2.8.0-dev-compliant syntax, but you are running 2.8.0. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. (masgn (mlhs (lvasgn :a) (lvasgn :b)) (send (int 13) :divmod (int 5))) ``` ## `rasgn` `rasgn` has the same structure as `mrasgn` without `mlhs`. So this PR adds `rasgn` to the same constant as `mrasgn`. ```console % ruby-parse -e '13.divmod(5) => a' warning: parser/current is loading parser/ruby28, which recognizes warning: 2.8.0-dev-compliant syntax, but you are running 2.8.0. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. (rasgn (send (int 13) :divmod (int 5)) (lvasgn :a)) ```
- Loading branch information