ruby-syntax-tree / syntax_tree

Interact with the Ruby syntax tree

Home Page:https://ruby-syntax-tree.github.io/syntax_tree/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AlternationPatternNode

kddnewton opened this issue · comments

Create a new node that replaces the usage of Binary within pattern matching expressions to represent the use of the | operator.

For example:

case foo
in Bar | Baz
end

In the above expression Bar | Baz is set as a Binary in Syntax Tree. Instead, we should have our own node for it.

YARP has: left, right, operator_loc, and location on it.