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

CapturePatternNode

kddnewton opened this issue · comments

Right now, when you capture an expression into a variable in pattern matching, we get a binary node. For example,

case foo
in Bar => baz
end

Instead, we should create a new node to represent this pattern. YARP calls this AsPatternNode but I don't like the name and am going to rename it to CapturePatternNode to be more clear.