Sha256: 570420f2b1b90fdd95107ae7a7ac8027c4abc84f9aec71e0ecaabc3ebbef0408

Contents?: true

Size: 433 Bytes

Versions: 4

Compression:

Stored size: 433 Bytes

Contents

module Yoda
  module AST
    class NameVnode < Vnode
      # @return [Symbol]
      def type
        :name
      end

      # @return [Symbol]
      attr_reader :name

      # @param name [Symbol]
      def initialize(name, **kwargs)
        @name = name
        super(**kwargs)
      end

      # @return [Array<Node>, nil]
      def children
        []
      end

      def inspect_content
        name
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yoda-language-server-0.10.1 lib/yoda/ast/name_vnode.rb
yoda-language-server-0.10.0 lib/yoda/ast/name_vnode.rb
yoda-language-server-0.9.0 lib/yoda/ast/name_vnode.rb
yoda-language-server-0.8.0 lib/yoda/ast/name_vnode.rb