Sha256: f55103138315916fc251dae0e15902608b75bc0dcfac39f5f4699ba253e6eacd

Contents?: true

Size: 1020 Bytes

Versions: 2675

Compression:

Stored size: 1020 Bytes

Contents

# frozen_string_literal: true

module Parser
  module AST

    ##
    # {Parser::AST::Node} contains information about a single AST node and its
    # child nodes. It extends the basic [AST::Node](http://rdoc.info/gems/ast/AST/Node)
    # class provided by gem [ast](http://rdoc.info/gems/ast).
    #
    # @api public
    #
    # @!attribute [r] location
    #  Source map for this Node.
    #  @return [Parser::Source::Map]
    #
    class Node < ::AST::Node
      attr_reader :location

      alias loc location

      ##
      # Assigns various properties to this AST node. Currently only the
      # location can be set.
      #
      # @param [Hash] properties
      # @option properties [Parser::Source::Map] :location Location information
      #  of the node.
      #
      def assign_properties(properties)
        if (location = properties[:location])
          location = location.dup if location.frozen?
          location.node = self
          @location = location
        end
      end
    end

  end
end

Version data entries

2,675 entries across 2,654 versions & 32 rubygems

Version Path
avalara_sdk-24.12.2 vendor/bundle/ruby/2.7.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
avalara_sdk-24.12.1 vendor/bundle/ruby/2.7.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
avalara_sdk-24.12.0 vendor/bundle/ruby/2.7.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
mux_ruby-3.20.0 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
mux_ruby-3.19.0 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
mux_ruby-3.18.0 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
mux_ruby-3.17.0 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/parser-3.1.2.1/lib/parser/ast/node.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/parser-3.1.2.1/lib/parser/ast/node.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/parser-3.1.2.1/lib/parser/ast/node.rb
mux_ruby-3.15.0 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
avalara_sdk-24.2.29 vendor/bundle/ruby/2.7.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
mux_ruby-3.14.0 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
mux_ruby-3.13.0 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
mux_ruby-3.12.0 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/parser-3.1.2.1/lib/parser/ast/node.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/parser-3.1.1.0/lib/parser/ast/node.rb
mux_ruby-3.11.1 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb
mux_ruby-3.11.0 vendor/bundle/ruby/3.2.0/gems/parser-3.1.2.0/lib/parser/ast/node.rb