diff --git a/lib/prism/node_ext.rb b/lib/prism/node_ext.rb index 8b92fe1feef..12567b8abfa 100644 --- a/lib/prism/node_ext.rb +++ b/lib/prism/node_ext.rb @@ -98,6 +98,19 @@ def full_name end end + class ConstantWriteNode < Node + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + def full_name_parts + [name] + end + + # Returns the full name of this constant. For example: "Foo" + def full_name + name.to_s + end + end + class ConstantPathNode < Node # An error class raised when dynamic parts are found while computing a # constant path's full name. For example: