File Manager

Path: /opt/chef.upgrade/embedded/lib/ruby/gems/2.3.0/gems/rubocop-0.47.1/lib/rubocop/ast/

Viewing File: sexp.rb

# frozen_string_literal: true

module RuboCop
  module AST
    # This module provides a shorthand method to create a {Node} like
    # `Parser::AST::Sexp`.
    #
    # @see http://rubydoc.info/gems/ast/AST/Sexp
    module Sexp
      # Creates a {Node} with type `type` and children `children`.
      def s(type, *children)
        Node.new(type, children)
      end
    end
  end
end