language stringclasses 1
value | owner stringlengths 2 15 | repo stringlengths 2 21 | sha stringlengths 45 45 | message stringlengths 7 36.3k | path stringlengths 1 199 | patch stringlengths 15 102k | is_multipart bool 2
classes |
|---|---|---|---|---|---|---|---|
Other | Homebrew | brew | 61a7ffb999963a2ef8d8f0b247956c8280cb831a.json | development_tools: add type signatures | Library/Homebrew/os/mac/xcode.rb | @@ -1,4 +1,4 @@
-# typed: false
+# typed: true
# frozen_string_literal: true
module OS
@@ -89,6 +89,7 @@ def without_clt?
# Returns a Pathname object corresponding to Xcode.app's Developer
# directory or nil if Xcode.app is not installed.
+ sig { returns(Pathname) }
def prefix
@... | true |
Other | Homebrew | brew | 61a7ffb999963a2ef8d8f0b247956c8280cb831a.json | development_tools: add type signatures | Library/Homebrew/os/mac/xcode.rbi | @@ -0,0 +1,9 @@
+# typed: strict
+
+module OS
+ module Mac
+ module Xcode
+ include Kernel
+ end
+ end
+end | true |
Other | Homebrew | brew | 4685120692e0bdea960d7a389801c2fc249b9d59.json | add cask option to brew log | Library/Homebrew/cmd/log.rb | @@ -1,7 +1,6 @@
# typed: false
# frozen_string_literal: true
-require "formula"
require "cli/parser"
module Homebrew
@@ -26,10 +25,15 @@ def log_args
description: "Print only one commit."
flag "-n", "--max-count=",
description: "Print only a specified number of commits."
+ ... | false |
Other | Homebrew | brew | 35e0b1bf85c12ed39295c9f781d604be58afb6c1.json | Update RBI files for nokogiri. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -9829,8 +9829,211 @@ class WeakRef
def initialize(orig); end
end
+class WebRobots
+ def allowed?(url); end
+
+ def crawl_delay(url); end
+
+ def create_cache(); end
+
+ def disallowed?(url); end
+
+ def error(url); end
+
+ def error!(url); end
+
+ def flush_cache(); end
+
+ def initialize(user_agent, o... | false |
Other | Homebrew | brew | 8398be5cde653f4637a81af8f7e078ddacc49417.json | docs/Installation: update commands for untar-anywhere method | docs/Homebrew-on-Linux.md | @@ -78,17 +78,6 @@ You may need to install your own Ruby using your system package manager, a PPA,
Homebrew does not currently support 32-bit x86 platforms. It would be possible for Homebrew to work on 32-bit x86 platforms with some effort. An interested and dedicated person could maintain a fork of Homebrew to deve... | true |
Other | Homebrew | brew | 8398be5cde653f4637a81af8f7e078ddacc49417.json | docs/Installation: update commands for untar-anywhere method | docs/Installation.md | @@ -53,6 +53,20 @@ here. *Pick another prefix at your peril!*
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
```
+or
+
+```sh
+git clone https://github.com/Homebrew/brew homebrew
+```
+
+then
+
+```sh
+eval "$(homebrew/bin/brew shellenv)"
+brew update --forc... | true |
Other | Homebrew | brew | 0109c699bcc0174d36aad0e0957b9b32b0e5d90c.json | Update RBI files for nokogiri. | Library/Homebrew/sorbet/rbi/gems/mini_portile2@2.6.1.rbi | @@ -32,6 +32,9 @@ class MiniPortile
def patch_files; end
def patch_files=(_arg0); end
def path; end
+ def prepare_build_directory; end
+ def source_directory; end
+ def source_directory=(path); end
def target; end
def target=(_arg0); end
def version; end | true |
Other | Homebrew | brew | 0109c699bcc0174d36aad0e0957b9b32b0e5d90c.json | Update RBI files for nokogiri. | Library/Homebrew/sorbet/rbi/gems/nokogiri@1.12.5.rbi | @@ -6,14 +6,17 @@
module Nokogiri
class << self
- def HTML(thing, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
+ def HTML(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
+ def HTML4(input, url = T.unsafe(nil), encoding = ... | true |
Other | Homebrew | brew | eb360dbbb054dd047b3c522c88c2c894442d8a5e.json | utils/bottle: fix local JSON handling for bottle rebuilds | Library/Homebrew/utils/bottles.rb | @@ -59,7 +59,7 @@ def resolve_formula_names(bottle_file)
receipt_file = file_from_bottle(bottle_file, receipt_file_path)
tap = Tab.from_file_content(receipt_file, "#{bottle_file}/#{receipt_file_path}").tap
"#{tap}/#{name}" if tap.present? && !tap.core_tap?
- elsif (bottle_json_pa... | false |
Other | Homebrew | brew | ab455d1f38220a358ec67b3bc32d5defa727ae80.json | os/mac/xquartz: fix handling of XQuartz 2.8.0+ | Library/Homebrew/os/mac/xquartz.rb | @@ -11,7 +11,8 @@ module XQuartz
module_function
- DEFAULT_BUNDLE_PATH = Pathname("Applications/Utilities/XQuartz.app").freeze
+ DEFAULT_BUNDLE_PATH = Pathname("/Applications/Utilities/XQuartz.app").freeze
+ NEW_BUNDLE_PKG_ID = "org.xquartz.X11"
FORGE_BUNDLE_ID = "org.macosforge.xquartz... | false |
Other | Homebrew | brew | 3e4cb206bb2bce403df4e72e1eb44cbdbb4d9e80.json | rubocops: silence parser warning | Library/Homebrew/rubocops/all.rb | @@ -6,7 +6,11 @@
require "rubocop-performance"
require "rubocop-rails"
require "rubocop-rspec"
-require "rubocop-sorbet"
+
+require_relative "../warnings"
+Warnings.ignore :parser_syntax do
+ require "rubocop-sorbet"
+end
require_relative "io_read"
require_relative "shell_commands" | true |
Other | Homebrew | brew | 3e4cb206bb2bce403df4e72e1eb44cbdbb4d9e80.json | rubocops: silence parser warning | Library/Homebrew/rubocops/extend/formula.rb | @@ -1,15 +1,6 @@
# typed: false
# frozen_string_literal: true
-# Silence compatibility warning.
-begin
- old_verbosity = $VERBOSE
- $VERBOSE = nil
- require "parser/current"
-ensure
- $VERBOSE = old_verbosity
-end
-
require "extend/string"
require "rubocops/shared/helper_functions"
| true |
Other | Homebrew | brew | 3e4cb206bb2bce403df4e72e1eb44cbdbb4d9e80.json | rubocops: silence parser warning | Library/Homebrew/rubocops/shared/helper_functions.rb | @@ -3,6 +3,11 @@
require "rubocop"
+require_relative "../../warnings"
+Warnings.ignore :parser_syntax do
+ require "parser/current"
+end
+
module RuboCop
module Cop
# Helper functions for cops. | true |
Other | Homebrew | brew | f1e4add444fa7ce4848a9b51c71f7a99d42ec796.json | formula_installer: fix installation of local bottles | Library/Homebrew/formula_installer.rb | @@ -150,6 +150,8 @@ def pour_bottle?(output_warning: false)
return false
end
+ return true if formula.local_bottle_path.present?
+
bottle = formula.bottle_for_tag(Utils::Bottles.tag.to_sym)
return false if bottle.nil?
| false |
Other | Homebrew | brew | 3af7646c5fdf78a5461d9ab334cdf266b15cb735.json | Update RBI files for rubocop-rspec. | Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.5.0.rbi | @@ -453,6 +453,23 @@ RuboCop::Cop::RSpec::ExampleWording::MSG_IT = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::ExampleWording::MSG_SHOULD = T.let(T.unsafe(nil), String)
RuboCop::Cop::RSpec::ExampleWording::SHOULD_PREFIX = T.let(T.unsafe(nil), Regexp)
+class RuboCop::Cop::RSpec::ExcessiveDocstringSpacing < ::R... | false |
Other | Homebrew | brew | 16afcff557af2ffaea7f76ea70574f831f7f9ae2.json | formula: fix error in Formula#specified_path with aliases | Library/Homebrew/formula.rb | @@ -310,7 +310,8 @@ def full_installed_alias_name
# The path that was specified to find this formula.
def specified_path
- default_specified_path = alias_path || path
+ default_specified_path = Pathname(alias_path) if alias_path.present?
+ default_specified_path ||= path
return default_specified... | true |
Other | Homebrew | brew | 16afcff557af2ffaea7f76ea70574f831f7f9ae2.json | formula: fix error in Formula#specified_path with aliases | Library/Homebrew/test/formula_spec.rb | @@ -28,7 +28,7 @@
let(:path) { Formulary.core_path(name) }
let(:spec) { :stable }
let(:alias_name) { "baz@1" }
- let(:alias_path) { CoreTap.instance.alias_dir/alias_name }
+ let(:alias_path) { (CoreTap.instance.alias_dir/alias_name).to_s }
let(:f) { klass.new(name, path, spec) }
let(:f_al... | true |
Other | Homebrew | brew | 8dc060c88b360c26571b2549af46a108fc7a9078.json | upgrade: use greedy_* method parameters | Library/Homebrew/cask/cmd/upgrade.rb | @@ -95,8 +95,8 @@ def self.upgrade_casks(
outdated_casks = if casks.empty?
Caskroom.casks(config: Config.from_args(args)).select do |cask|
- cask.outdated?(greedy: greedy, greedy_latest: args.greedy_latest?,
- greedy_auto_updates: args.greedy_auto_updates?)
+ ... | true |
Other | Homebrew | brew | 8dc060c88b360c26571b2549af46a108fc7a9078.json | upgrade: use greedy_* method parameters | Library/Homebrew/cmd/upgrade.rb | @@ -234,15 +234,17 @@ def upgrade_outdated_casks(casks, args:)
Cask::Cmd::Upgrade.upgrade_casks(
*casks,
- force: args.force?,
- greedy: args.greedy?,
- dry_run: args.dry_run?,
- binaries: args.binaries?,
- quarantine: args.quarantine?,
- req... | true |
Other | Homebrew | brew | 59dc0ed6521b98265230ac76e762064cedd25bcb.json | formula_installer: fix error if a compatible bottle was not found | Library/Homebrew/cmd/--cache.rb | @@ -63,7 +63,7 @@ def __cache
sig { params(formula: Formula, args: CLI::Args).void }
def print_formula_cache(formula, args:)
if fetch_bottle?(formula, args: args)
- puts formula.bottle_for_tag(args.bottle_tag).cached_download
+ puts formula.bottle_for_tag(args.bottle_tag&.to_sym).cached_download
... | true |
Other | Homebrew | brew | 59dc0ed6521b98265230ac76e762064cedd25bcb.json | formula_installer: fix error if a compatible bottle was not found | Library/Homebrew/cmd/fetch.rb | @@ -93,7 +93,7 @@ def fetch
begin
f.clear_cache if args.force?
f.fetch_bottle_tab
- fetch_formula(f.bottle_for_tag(args.bottle_tag), args: args)
+ fetch_formula(f.bottle_for_tag(args.bottle_tag&.to_sym), args: args)
rescue Interrupt
rais... | true |
Other | Homebrew | brew | 59dc0ed6521b98265230ac76e762064cedd25bcb.json | formula_installer: fix error if a compatible bottle was not found | Library/Homebrew/formula.rb | @@ -371,7 +371,7 @@ def bottle
# The Bottle object for given tag.
# @private
- sig { params(tag: T.nilable(String)).returns(T.nilable(Bottle)) }
+ sig { params(tag: T.nilable(Symbol)).returns(T.nilable(Bottle)) }
def bottle_for_tag(tag = nil)
Bottle.new(self, bottle_specification, tag) if bottled?(tag... | true |
Other | Homebrew | brew | 59dc0ed6521b98265230ac76e762064cedd25bcb.json | formula_installer: fix error if a compatible bottle was not found | Library/Homebrew/formula_installer.rb | @@ -150,8 +150,10 @@ def pour_bottle?(output_warning: false)
return false
end
- bottle = formula.bottle
- if bottle && !bottle.compatible_locations?
+ bottle = formula.bottle_for_tag(Utils::Bottles.tag.to_sym)
+ return false if bottle.nil?
+
+ unless bottle.compatible_locations?
if o... | true |
Other | Homebrew | brew | 946c13cd05b2e9721262c31396730adee8ef44d7.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -9713,6 +9713,11 @@ class UnpackStrategy::Zip
extend ::T::Private::Methods::SingletonMethodHooks
end
+class UnpackStrategy::Zstd
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
module UnpackStrategy
extend ::T::Private::Abstract::Hooks
extend ::T... | false |
Other | Homebrew | brew | c7badb1e5413052def6fdade669fe6da55689222.json | formula_cellar_checks: fix edge case handling in `check_binary_arches`
Currently, if formula `foo` ships both universal and non-native
binaries and `foo` is on both allowlists, then `brew audit --strict`
errors out with an empty error message:
❯ brew audit --strict foo
foo:
*
Error: 1 problem in 1 f... | Library/Homebrew/formula_cellar_checks.rb | @@ -341,6 +341,8 @@ def check_binary_arches(formula)
mismatches_expected = formula.tap.blank? || tap_audit_exception(:mismatched_binary_allowlist, formula.name)
return if compatible_universal_binaries.empty? && mismatches_expected
+ return if universal_binaries_expected && mismatches_expected
+
s = ... | false |
Other | Homebrew | brew | e224006b4979c78c2966d7c1ef7df9b5f9dbc7d2.json | test/bash_spec: ignore cc script | Library/Homebrew/test/bash_spec.rb | @@ -48,6 +48,7 @@
next if path.directory?
next if path.symlink?
next unless path.executable?
+ next if path.basename.to_s == "cc" # `bash -n` tries to parse the Ruby part
next unless path.read(12) == "#!/bin/bash\n"
expect(path).to have_valid_bash_syntax | false |
Other | Homebrew | brew | d00b387bc244bfaff854f7c728463f6114bbdf14.json | dev-cmd/typecheck: use new tapioca command | Library/Homebrew/dev-cmd/typecheck.rb | @@ -53,7 +53,7 @@ def typecheck
]
ohai "Updating Tapioca RBI files..."
- system "bundle", "exec", "tapioca", "sync", "--exclude", *excluded_gems
+ system "bundle", "exec", "tapioca", "gem", "--exclude", *excluded_gems
system "bundle", "exec", "parlour"
system "bundle"... | false |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | .gitignore | @@ -127,6 +127,7 @@
**/vendor/bundle/ruby/*/gems/pry-*/
**/vendor/bundle/ruby/*/gems/racc-*/
**/vendor/bundle/ruby/*/gems/rainbow-*/
+**/vendor/bundle/ruby/*/gems/rbi-*/
**/vendor/bundle/ruby/*/gems/rdiscount-*/
**/vendor/bundle/ruby/*/gems/regexp_parser-*/
**/vendor/bundle/ruby/*/gems/rexml-*/
@@ -157,6 +158,7 @... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi.rb | @@ -1,23 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-require "sorbet-runtime"
-require "stringio"
-
-module RBI
- class Error < StandardError; end
-end
-
-require "rbi/loc"
-require "rbi/model"
-require "rbi/visitor"
-require "rbi/index"
-require "rbi/rewriters/add_sig_templates"
-require "rbi/rewriters... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/index.rb | @@ -1,186 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- class Index < Visitor
- extend T::Sig
- include T::Enumerable
-
- sig { params(node: Node).returns(Index) }
- def self.index(*node)
- index = Index.new
- index.visit_all(node)
- index
- end
-
- sig { void... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/loc.rb | @@ -1,36 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- class Loc
- extend T::Sig
-
- sig { returns(T.nilable(String)) }
- attr_reader :file
-
- sig { returns(T.nilable(Integer)) }
- attr_reader :begin_line, :end_line, :begin_column, :end_column
-
- sig do
- params(
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/model.rb | @@ -1,1251 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- class Node
- extend T::Sig
- extend T::Helpers
-
- abstract!
-
- sig { returns(T.nilable(Tree)) }
- attr_accessor :parent_tree
-
- sig { returns(T.nilable(Loc)) }
- attr_accessor :loc
-
- sig { params(loc: T.nila... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/parser.rb | @@ -1,562 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-require "unparser"
-
-module RBI
- class ParseError < StandardError
- extend T::Sig
-
- sig { returns(Loc) }
- attr_reader :location
-
- sig { params(message: String, location: Loc).void }
- def initialize(message, location)
- sup... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/printer.rb | @@ -1,737 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- class Printer < Visitor
- extend T::Sig
-
- sig { returns(T::Boolean) }
- attr_accessor :print_locs, :in_visibility_group
-
- sig { returns(T.nilable(Node)) }
- attr_reader :previous_node
-
- sig { params(out: T.any(IO,... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/rewriters/add_sig_templates.rb | @@ -1,71 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- module Rewriters
- class AddSigTemplates < Visitor
- extend T::Sig
-
- sig { params(with_todo_comment: T::Boolean).void }
- def initialize(with_todo_comment: true)
- super()
- @with_todo_comment = with_todo... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/rewriters/group_nodes.rb | @@ -1,104 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- module Rewriters
- class GroupNodes < Visitor
- extend T::Sig
-
- sig { override.params(node: T.nilable(Node)).void }
- def visit(node)
- return unless node
-
- case node
- when Tree
- kind... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/rewriters/merge_trees.rb | @@ -1,629 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- module Rewriters
- # Merge two RBI trees together
- #
- # Be this `Tree`:
- # ~~~rb
- # class Foo
- # attr_accessor :a
- # def m; end
- # C = 10
- # end
- # ~~~
- #
- # Merged with this one:
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/rewriters/nest_non_public_methods.rb | @@ -1,63 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- module Rewriters
- class NestNonPublicMethods < Visitor
- extend T::Sig
-
- sig { override.params(node: T.nilable(Node)).void }
- def visit(node)
- return unless node
-
- case node
- when Tree
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/rewriters/nest_singleton_methods.rb | @@ -1,40 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- module Rewriters
- class NestSingletonMethods < Visitor
- extend T::Sig
-
- sig { override.params(node: T.nilable(Node)).void }
- def visit(node)
- return unless node
-
- case node
- when Tree
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/rewriters/sort_nodes.rb | @@ -1,84 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- module Rewriters
- class SortNodes < Visitor
- extend T::Sig
-
- sig { override.params(node: T.nilable(Node)).void }
- def visit(node)
- return unless node.is_a?(Tree)
- visit_all(node.nodes)
- origi... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/version.rb | @@ -1,7 +0,0 @@
-# typed: true
-# typed: false
-# frozen_string_literal: true
-
-module RBI
- VERSION = "0.0.4"
-end | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rbi-0.0.4/lib/rbi/visitor.rb | @@ -1,19 +0,0 @@
-# typed: strict
-# frozen_string_literal: true
-
-module RBI
- class Visitor
- extend T::Helpers
- extend T::Sig
-
- abstract!
-
- sig { abstract.params(node: T.nilable(Node)).void }
- def visit(node); end
-
- sig { params(nodes: T::Array[Node]).void }
- def visit_all(nodes)
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser.rb | @@ -1,238 +0,0 @@
-# frozen_string_literal: true
-
-require 'diff/lcs'
-require 'diff/lcs/hunk'
-require 'optparse'
-require 'parser/current'
-require 'set'
-
-require 'unparser/equalizer'
-require 'unparser/adamantium'
-require 'unparser/adamantium/method_builder'
-require 'unparser/abstract_type'
-
-require 'unparser... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/abstract_type.rb | @@ -1,121 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # Module to allow class and methods to be abstract
- #
- # Original code before vendoring and reduction from: https://github.com/dkubb/abstract_type.
- module AbstractType
-
- # Hook called when module is included
- #
- # @param [Module]... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/adamantium.rb | @@ -1,150 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # Allows objects to be made immutable
- #
- # Original code before vendoring and reduction from: https://github.com/dkubb/adamantium.
- module Adamantium
- module InstanceMethods
- # A noop #dup for immutable objects
- #
- # @re... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/adamantium/method_builder.rb | @@ -1,110 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- module Adamantium
- # Build the memoized method
- class MethodBuilder
-
- # Raised when the method arity is invalid
- class InvalidArityError < ArgumentError
-
- # Initialize an invalid arity exception
- #
- # @p... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/anima.rb | @@ -1,184 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # Original code before vendoring and reduction from: https://github.com/mbj/anima.
- class Anima < Module
- include Adamantium, Equalizer.new(:attributes)
-
- # Return names
- #
- # @return [AttributeSet]
- attr_reader :attributes
-
... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/anima/attribute.rb | @@ -1,59 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Anima
- # An attribute
- class Attribute
- include Adamantium, Equalizer.new(:name)
-
- # Initialize attribute
- #
- # @param [Symbol] name
- def initialize(name)
- @name = name
- @instance_variable_... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/anima/error.rb | @@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Anima
- # Abstract base class for anima errors
- class Error < RuntimeError
- FORMAT = '%s attributes missing: %s, unknown: %s'.freeze
- private_constant(*constants(false))
-
- # Initialize object
- #
- # @param [... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/ast.rb | @@ -1,201 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # Namespace for AST processing tools
- module AST
- FIRST_CHILD = ->(node) { node.children.first }.freeze
- TAUTOLOGY = ->(_node) { true }.freeze
-
- RESET_NODES = %i[module class sclass def defs].freeze
- INHERIT_NODES = [:block].f... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/ast/local_variable_scope.rb | @@ -1,174 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- module AST
-
- # Calculated local variable scope for a given node
- class LocalVariableScope
- include Enumerable, Adamantium, Concord.new(:node)
-
- # Initialize object
- #
- # @param [Parser::AST::Node] node
- #
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/buffer.rb | @@ -1,143 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
-
- # Buffer used to emit into
- class Buffer
-
- NL = "\n".freeze
-
- # Initialize object
- #
- # @return [undefined]
- #
- # @api private
- #
- def initialize
- @content = +''
- @indent = 0
- end
-
- # Append... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/cli.rb | @@ -1,179 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # Unparser CLI implementation
- class CLI
-
- EXIT_SUCCESS = 0
- EXIT_FAILURE = 1
-
- class Target
- include AbstractType
-
- # Path target
- class Path < self
- include Concord.new(:path)
-
- # Validation for ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/color.rb | @@ -1,39 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # Class to colorize strings
- class Color
- include Adamantium, Concord.new(:code)
-
- # Format text with color
- #
- # @param [String] text
- #
- # @return [String]
- def format(text)
- "\e[#{code}m#{text}\e[0m"
- end
-... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/comments.rb | @@ -1,130 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
-
- # Holds the comments that remain to be emitted
- class Comments
-
- # Proxy to singleton
- #
- # NOTICE:
- # Delegating to stateless helpers is a pattern I saw many times in our code.
- # Maybe we should make another helper mod... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/concord.rb | @@ -1,114 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # A mixin to define a composition
- #
- # Original code before vendoring and reduction from: https://github.com/mbj/concord.
- class Concord < Module
- include Adamantium, Equalizer.new(:names)
-
- # The maximum number of objects the hostin... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/constants.rb | @@ -1,71 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # All unparser constants maybe included in other libraries.
- module Constants
-
- # All unary operators of the ruby language
- UNARY_OPERATORS = %i[
- ! ~ -@ +@
- ].to_set.freeze
-
- # All binary operators of the ruby language
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/diff.rb | @@ -1,98 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # Class to create diffs from source code
- class Diff
- include Adamantium, Concord.new(:old, :new)
-
- ADDITION = '+'
- DELETION = '-'
- NEWLINE = "\n"
-
- # Unified source diff between old and new
- #
- # @return [String]
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/dsl.rb | @@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- # DSL to help defining emitters
- module DSL
-
- private
-
- def define_remaining_children(names)
- range = names.length..-1
- define_method(:remaining_children) do
- children[range]
- end
- private :remaining_children... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/either.rb | @@ -1,153 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- module RequireBlock
-
- private
-
- # Raise error unless block is provided
- #
- # @raise [MissingBlockError]
- # if no block is given
- #
- # @return [self]
- def require_block
- fail LocalJumpError unless block_given?
... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter.rb | @@ -1,95 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- UnknownNodeError = Class.new(ArgumentError)
-
- # Emitter base class
- class Emitter
- include Adamantium, AbstractType, Constants, Generation, NodeHelpers
- include Anima.new(:buffer, :comments, :node, :local_variable_scope)
-
- public :n... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/alias.rb | @@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for alias nodes
- class Alias < self
-
- handle :alias
-
- children :target, :source
-
- private
-
- def dispatch
- write('alias ')
- visit(target)
- ws
- visit(source)
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/args.rb | @@ -1,45 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Arguments emitter
- class Args < self
- def emit_block_arguments
- delimited(normal_arguments)
-
- write(',') if normal_arguments.one? && n_arg?(normal_arguments.first)
-
- emit_shadowargs
- end
... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/argument.rb | @@ -1,136 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for block and kwrestarg arguments
- class Morearg < self
- MAP = {
- blockarg: '&',
- kwrestarg: '**'
- }.freeze
-
- handle(*MAP.keys)
-
- children :name
-
- private
-
- def ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/array.rb | @@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Array literal emitter
- class Array < self
- handle :array
-
- def emit_heredoc_reminders
- emitters.each(&:emit_heredoc_reminders)
- end
-
- private
-
- def dispatch
- parentheses('[', ']'... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/array_pattern.rb | @@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for array patterns
- class ArrayPattern < self
-
- handle :array_pattern
- handle :array_pattern_with_tail
-
- private
-
- def dispatch
- write('[')
- delimited(children, &method(:emit_m... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/assignment.rb | @@ -1,76 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
-
- # Base class for assignment emitters
- class Assignment < self
- BINARY_OPERATOR = %i[and or].freeze
-
- def symbol_name
- true
- end
-
- def emit_heredoc_reminders
- return unless right
-
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/begin.rb | @@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
-
- # Emitter for begin nodes
- class Begin < self
- handle :begin
- children :body
-
- def emit_heredoc_reminders
- children.each do |child|
- emitter(child).emit_heredoc_reminders
- end
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/binary.rb | @@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Non send binary operator / keyword emitter
- class Binary < self
- handle :and, :or
-
- private
-
- def dispatch
- writer.dispatch
- end
-
- def writer
- writer_with(Writer::Binary, node)
-... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/block.rb | @@ -1,87 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
-
- # Block emitter
- class Block < self
- handle :block, :numblock
-
- children :target, :arguments, :body
-
- private
-
- def dispatch
- emit_target
- ws
- write_open
- target_writer... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/case.rb | @@ -1,63 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for case nodes
- class Case < self
- handle :case
-
- children :condition
- define_group :whens, 1..-2
-
- private
-
- def dispatch
- write('case')
- emit_condition
- emit_wh... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/case_guard.rb | @@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for case guards
- class CaseGuard < self
-
- handle :if_guard, :unless_guard
-
- MAP = {
- if_guard: 'if',
- unless_guard: 'unless'
- }.freeze
-
- children :condition
-
- privat... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/case_match.rb | @@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for case matches
- class CaseMatch < self
-
- handle :case_match
-
- children :target
-
- define_group :patterns, 1..-2
-
- private
-
- def else_branch
- children.last
- end
-
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/cbase.rb | @@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for toplevel constant reference nodes
- class CBase < self
- handle :cbase
-
- private
-
- # Perform dispatch
- #
- # @return [undefined]
- #
- # @api private
- #
- def dispat... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/class.rb | @@ -1,49 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for class nodes
- class Class < self
- include LocalVariableRoot
-
- handle :class
-
- children :name, :superclass, :body
-
- private
-
- def dispatch
- write('class ')
- visit(name... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/const_pattern.rb | @@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for const pattern node
- class ConstPattern < self
-
- handle :const_pattern
-
- children :const, :pattern
-
- private
-
- def dispatch
- visit(const)
- if n_hash_pattern?(pattern)
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/def.rb | @@ -1,78 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for def node
- class Def < self
- include LocalVariableRoot
-
- private
-
- abstract_method :emit_name
- private :emit_name
-
- abstract_method :body
- private :body
-
- def dispatch
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/defined.rb | @@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for defined? nodes
- class Defined < self
- handle :defined?
-
- children :subject
-
- private
-
- def dispatch
- write('defined?')
- parentheses { visit(subject) }
- end
-
- end... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/dstr.rb | @@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Dynamic string emitter
- class DStr < self
-
- handle :dstr
-
- def emit_heredoc_reminders
- writer_with(Writer::DynamicString, node).emit_heredoc_reminder
- end
-
- private
-
- def dispatch
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/dsym.rb | @@ -1,41 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Dynamic symbol literal emitter
- class DSym < self
- handle :dsym
-
- private
-
- def dispatch
- write(':"')
- children.each do |child|
- case child.type
- when :str
- em... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/flipflop.rb | @@ -1,34 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for flip flops
- class FlipFlop < self
- MAP = {
- iflipflop: '..',
- eflipflop: '...'
- }.freeze
-
- SYMBOLS = {
- eflipflop: :tDOT3,
- iflipflop: :tDOT2
- }.freeze
-
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/float.rb | @@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emiter for float literals
- class Float < self
- handle :float
-
- children :value
-
- INFINITY = ::Float::INFINITY
- NEG_INFINITY = -::Float::INFINITY
-
- private
-
- def dispatch
- case... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/flow_modifier.rb | @@ -1,42 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter control flow modifiers
- class FlowModifier < self
- MAP = {
- return: 'return',
- next: 'next',
- break: 'break'
- }.freeze
-
- private_constant(*constants(false))
-
- handl... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/for.rb | @@ -1,29 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for for nodes
- class For < self
- handle :for
-
- children :condition, :assignment, :body
-
- private
-
- def dispatch
- write('for ')
- emit_condition
- emit_optional_body(body)... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/hash.rb | @@ -1,44 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for Hash literals
- class Hash < self
- handle :hash
-
- def emit_last_argument_hash
- if children.empty?
- write('{}')
- else
- emit_hash_body
- end
- end
-
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/hash_pattern.rb | @@ -1,67 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for hash patterns
- class HashPattern < self
-
- handle :hash_pattern
-
- def emit_const_pattern
- parentheses do
- emit_hash_body
- end
- end
-
- private
-
- def dispatch
... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/hookexe.rb | @@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Base class for pre and postexe emitters
- class Hookexe < self
-
- MAP = {
- preexe: 'BEGIN',
- postexe: 'END'
- }.freeze
-
- handle(*MAP.keys)
-
- children :body
-
- private
-
- def ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/if.rb | @@ -1,80 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter if nodes
- class If < self
- handle :if
-
- children :condition, :if_branch, :else_branch
-
- def emit_ternary
- visit(condition)
- write(' ? ')
- visit(if_branch)
- write(' :... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/in_match.rb | @@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for in pattern nodes
- class InMatch < self
-
- handle :in_match
-
- children :target, :pattern
-
- private
-
- def dispatch
- visit(target)
- write(' in ')
- visit(pattern)
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/in_pattern.rb | @@ -1,36 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for in pattern nodes
- class InPattern < self
-
- handle :in_pattern
-
- children :target, :unless_guard, :branch, :else_branch
-
- private
-
- def dispatch
- write('in')
-
- ws
-
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/index.rb | @@ -1,69 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for send to index references
- class Index < self
-
- private
-
- def dispatch
- emit_receiver
- emit_operation
- end
-
- def emit_receiver
- visit(first_child)
- end
-
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/kwargs.rb | @@ -1,13 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- class Kwargs < self
- handle :kwargs
-
- def dispatch
- delimited(children)
- end
- end # Kwargs
- end # Emitter
-end # Unparser | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/kwbegin.rb | @@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for explicit begins
- class KWBegin < self
- handle :kwbegin
-
- private
-
- def dispatch
- write('begin')
-
- if children.one?
- emit_body_ensure_rescue(children.first)
- els... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/lambda.rb | @@ -1,17 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for lambda nodes
- class Lambda < self
- handle :lambda
-
- private
-
- def dispatch
- write('->')
- end
-
- end # Lambda
- end # Emitter
-end # Unparser | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/masgn.rb | @@ -1,20 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for multiple assignment nodes
- class MASGN < self
- handle :masgn
-
- children :target, :source
-
- private
-
- def dispatch
- visit(target)
- write(' = ')
- visit(source)
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/match.rb | @@ -1,40 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
-
- # Base class for special match node emitters
- class Match < self
- # Emitter for match with local variable assignment
- class Lvasgn < self
- handle :match_with_lvasgn
-
- children :regexp, :lvasgn
-
-... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/match_alt.rb | @@ -1,23 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for in pattern nodes
- class MatchAlt < self
-
- handle :match_alt
-
- children :left, :right
-
- private
-
- def dispatch
- visit(left)
- ws
- write('|')
- ws
- vis... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/match_as.rb | @@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for in pattern nodes
- class MatchAs < self
-
- handle :match_as
-
- children :left, :right
-
- private
-
- def dispatch
- visit(left)
- write(' => ')
- visit(right)
- end
- ... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/match_pattern.rb | @@ -1,22 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emitter for in pattern nodes
- class MatchPattern < self
-
- handle :match_pattern
- handle :match_pattern_p
-
- children :target, :pattern
-
- private
-
- def dispatch
- visit(target)
- wr... | true |
Other | Homebrew | brew | 1537e2eccdede455de4c802da7510cc81d1bab52.json | Ignore new dependencies | Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/unparser-0.6.0/lib/unparser/emitter/match_rest.rb | @@ -1,26 +0,0 @@
-# frozen_string_literal: true
-
-module Unparser
- class Emitter
- # Emiter for match rest nodes
- class MatchRest < self
- children :match_var
-
- def emit_array_pattern
- write('*')
- emit_match_var
- end
-
- def emit_hash_pattern
- write('**')
- ... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.