Predefined Keys
A result class specialized for holding tokens produced by the lexer.
Ignored newlines can occasionally have a LABEL state attached to them, so we compare the state differently here.
A repository is a configured collection of fields and a set of entries that knows how to reparse a source and reify the values.
This class is the entry-point for Ruby
3.3 of Prism::Translation::Parser
.
A DNS
resource abstract class.
TarReader
reads tar files and allows iteration over their items
A semi-compatible DSL for the Bundler
Gemfile and Isolate gem dependencies files.
To work with both the Bundler
Gemfile and Isolate formats this implementation takes some liberties to allow compatibility with each, most notably in source
.
A basic gem dependencies file will look like the following:
source 'https://rubygems.org' gem 'rails', '3.2.14a gem 'devise', '~> 2.1', '>= 2.1.3' gem 'cancan' gem 'airbrake' gem 'pg'
RubyGems recommends saving this as gem.deps.rb over Gemfile or Isolate.
To install the gems in this Gemfile use ‘gem install -g` to install it and create a lockfile. The lockfile will ensure that when you make changes to your gem dependencies file a minimum amount of change is made to the dependencies of your gems.
RubyGems can activate all the gems in your dependencies file at startup using the RUBYGEMS_GEMDEPS environment variable or through Gem.use_gemdeps
. See Gem.use_gemdeps
for details and warnings.
See ‘gem help install` and `gem help gem_dependencies` for further details.
A set which represents the installed gems. Respects all the normal settings that control where to look for installed gems.
A VendorSet
represents gems that have been unpacked into a specific directory that contains a gemspec.
This is used for gem dependency file support.
Example:
set = Gem::Resolver::VendorSet.new set.add_vendor_gem 'rake', 'vendor/rake'
The directory vendor/rake must contain an unpacked rake gem along with a rake.gemspec (watching the given name).
This represents a vendored source that is similar to an installed gem.
An absolutely silent download reporter.
Shows surrounding kw/end pairs
The purpose of showing these extra pairs is due to cases of ambiguity when only one visible line is matched.
For example:
1 class Dog 2 def bark 4 def eat 5 end 6 end
In this case either line 2 could be missing an ‘end` or line 4 was an extra line added by mistake (it happens).
When we detect the above problem it shows the issue as only being on line 2
2 def bark
Showing “neighbor” keyword pairs gives extra context:
2 def bark 4 def eat 5 end
Example:
lines = BeforeAfterKeywordEnds.new( block: block, code_lines: code_lines ).call()
Indicates some other unhandled resolver error was encountered.
An object that represents a slice of a comment.
The parser gem has a list of diagnostics with a hard-coded set of error messages. We create our own diagnostic class in order to set our own error messages.
A visitor that knows how to convert a prism syntax tree into the whitequark/parser gem’s syntax tree.
A prism visitor that builds Sexp objects.
An authoritative name server.