Skip to content

Commit e7000a1

Browse files
committed
== operator for green trees
1 parent 244be72 commit e7000a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/green_tree.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ head(node::GreenNode) = node.head
5555

5656
Base.summary(node::GreenNode) = summary(node.head)
5757

58+
function Base.:(==)(n1::GreenNode, n2::GreenNode)
59+
n1.head == n2.head && n1.span == n2.span && n1.args == n2.args
60+
end
61+
5862
# Pretty printing
5963
function _show_green_node(io, node, indent, pos, str, show_trivia)
6064
if !show_trivia && is_trivia(node)

0 commit comments

Comments
 (0)