[ruby/yarp] Use node kind for Ruby types
* For example in ProgramNode: # attr_reader statements: Node => # attr_reader statements: StatementsNode https://github.com/ruby/yarp/commit/ffed35238c
This commit is contained in:
parent
725ca2f9d8
commit
55f930aa7e
@ -23,6 +23,10 @@ module KindTypes
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def ruby_type
|
||||||
|
options[:kind] || "Node"
|
||||||
|
end
|
||||||
|
|
||||||
def java_type
|
def java_type
|
||||||
options[:kind] || "Node"
|
options[:kind] || "Node"
|
||||||
end
|
end
|
||||||
@ -42,7 +46,7 @@ class NodeParam < Param
|
|||||||
include KindTypes
|
include KindTypes
|
||||||
|
|
||||||
def rbs_class
|
def rbs_class
|
||||||
"Node"
|
ruby_type
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -52,7 +56,7 @@ class OptionalNodeParam < Param
|
|||||||
include KindTypes
|
include KindTypes
|
||||||
|
|
||||||
def rbs_class
|
def rbs_class
|
||||||
"Node?"
|
"#{ruby_type}?"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user