def constant_segments(node = self.node)
      segments = []

      if has_child_node?(node)
        segments.concat(constant_segments(node.children[0]))
      end

      segments << [node.type, name_for_node(node)]

      return segments
    end
def constant_segments(node = self.node)
      segments = []

      if has_child_node?(node)
        segments.concat(constant_segments(node.children[0]))
      end

      segments << [node.type, name_for_node(node)]

      return segments
    end
Returns an Array containing the segments of a constant path.

 @param [RubyLint::AST::Node] node
 @return [Array<Array(Symbol,String)>]