Skip to content

Commit 6d60605

Browse files
committed
Add '#type' method, as part of slowly migrating towards a more structured
AST node
1 parent a76c5fb commit 6d60605

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ast.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def initialize(*elements)
4747
super(*elements)
4848
end
4949

50+
def type
51+
elements.first
52+
end
53+
5054
# FIXME: For self-hosting, we temporarily rename this variable
5155
# as one of the tree transforms is too aggressive, and for
5256
# the time being it's easier to work around here.

0 commit comments

Comments
 (0)