Module: RBS::Inline::AST::Declarations::ConstantUtil
- Included in:
- ClassDecl, ConstantDecl, DataAssignDecl, ModuleDecl, StructAssignDecl, Members::RubyMixin
- Defined in:
- lib/rbs/inline/ast/declarations.rb
Instance Method Summary collapse
Instance Method Details
#type_name(node) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/rbs/inline/ast/declarations.rb', line 10 def type_name(node) case node when Prism::ConstantReadNode, Prism::ConstantPathNode TypeName.parse(node.full_name) end end |
#value_node(node) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rbs/inline/ast/declarations.rb', line 18 def value_node(node) case node when Prism::ConstantWriteNode value_node(node.value) when Prism::LocalVariableWriteNode value_node(node.value) else node end end |