Skip to content

Commit ffed352

Browse files
committed
Use node kind for Ruby types
* For example in ProgramNode: # attr_reader statements: Node => # attr_reader statements: StatementsNode
1 parent e39f861 commit ffed352

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

templates/template.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def c_type
2323
end
2424
end
2525

26+
def ruby_type
27+
options[:kind] || "Node"
28+
end
29+
2630
def java_type
2731
options[:kind] || "Node"
2832
end
@@ -42,7 +46,7 @@ class NodeParam < Param
4246
include KindTypes
4347

4448
def rbs_class
45-
"Node"
49+
ruby_type
4650
end
4751
end
4852

@@ -52,7 +56,7 @@ class OptionalNodeParam < Param
5256
include KindTypes
5357

5458
def rbs_class
55-
"Node?"
59+
"#{ruby_type}?"
5660
end
5761
end
5862

0 commit comments

Comments
 (0)