Switch
that takes an argument, which does not begin with ‘-’ or is ‘-’.
Ignored newlines can occasionally have a LABEL state attached to them, so we compare the state differently here.
An error class raised when dynamic parts are found while computing a constant path’s full name. For example: Foo::Bar::Baz -> does not raise because all parts of the constant path are simple constants var::Bar::Baz -> raises because the first part of the constant path is a local variable
The :line tracepoint event gets fired whenever the Ruby
VM encounters an expression on a new line. The types of expressions that can trigger this event are:
if statements
unless statements
nodes that are children of statements lists
In order to keep track of the newlines, we have a list of offsets that come back from the parser. We assign these offsets to the first nodes that we find in the tree that are on those lines.
Note that the logic in this file should be kept in sync with the Java MarkNewlinesVisitor, since that visitor is responsible for marking the newlines for JRuby/TruffleRuby.
This file is autoloaded only when mark_newlines!
is called, so the re-opening of the various nodes in this file will only be performed in that case. We do that to avoid storing the extra @newline
instance variable on every node if we don’t need it.
Represents the source of a repository that will be reparsed.
A source that is represented by a file path.
A source that is represented by a string.
A field representing the start and end lines.
A field representing the trailing comments.
A DNS
resource abstract class.
Searches for gems starting with the supplied argument.
Raised when a tar file is corrupt
Represents a specification retrieved via the rubygems.org API.
This is used to avoid loading the full Specification object when all we need is the name, version, and dependencies.
A GitSpecification
represents a gem that is sourced from a git repository and is being loaded through a gem dependencies file through the git:
option.
Represents a possible Specification object returned from IndexSet. Used to delay needed to download full Specification objects when only the name
and version
are needed.
An InstalledSpecification
represents a gem that is already installed locally.
A LocalSpecification
comes from a .gem file on the local filesystem.
The LockSpecification
comes from a lockfile (Gem::RequestSet::Lockfile
).
A LockSpecification’s dependency information is pre-filled from the lockfile.
The RequirementList
is used to hold the requirements being considered while resolving a set of gems.
The RequirementList
acts like a queue where the oldest items are removed first.