Results for: "tally"

No documentation available

The offset from the start of the file in code units of the given encoding.

The column number in code units of the given encoding where this location starts from the start of the line.

in foo | bar

in Prism::ConstantReadNode

in ConstantReadNode in String

Returns the full name of this Gem (see ‘Gem::BasicSpecification#full_name`). Information about where the gem is installed is also included if not installed in the default GEM_HOME.

Get a single optional argument from the command line. If more than one argument is given, return only the first. Return nil if none are given.

No documentation available

Find the best specification matching a full_name.

No documentation available
No documentation available

Scanning is intentionally conservative because we have no way of rolling back an aggressive block (at this time)

If a block was stopped for some trivial reason, (like an empty line) but the next line would have caused it to be balanced then we can check that condition and grab just one more line either up or down.

For example, below if we’re scanning up, line 2 might cause the scanning to stop. This is because empty lines might denote logical breaks where the user intended to chunk code which is a good place to stop and check validity. Unfortunately it also means we might have a “dangling” keyword or end.

1 def bark
2
3 end

If lines 2 and 3 are in the block, then when this method is run it would see it is unbalanced, but that acquiring line 1 would make it balanced, so that’s what it does.

Add local/remote options to the command line parser.

Iterates over strongly connected component in the subgraph reachable from node.

Return value is unspecified.

each_strongly_connected_component_from doesn’t call tsort_each_node.

class G
  include TSort
  def initialize(g)
    @g = g
  end
  def tsort_each_child(n, &b) @g[n].each(&b) end
  def tsort_each_node(&b) @g.each_key(&b) end
end

graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]})
graph.each_strongly_connected_component_from(2) {|scc| p scc }
#=> [4]
#   [2]

graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]})
graph.each_strongly_connected_component_from(2) {|scc| p scc }
#=> [4]
#   [2, 3]

Iterates over strongly connected components in a graph. The graph is represented by node and each_child.

node is the first node. each_child should have call method which takes a node argument and yields for each child node.

Return value is unspecified.

TSort.each_strongly_connected_component_from is a class method and it doesn’t need a class to represent a graph which includes TSort.

graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_child = lambda {|n, &b| graph[n].each(&b) }
TSort.each_strongly_connected_component_from(1, each_child) {|scc|
  p scc
}
#=> [4]
#   [2, 3]
#   [1]

Whether this RR is in AliasMode.

No documentation available

This integer returns the current initial length of the buffer.

This sets the initial length of the buffer to length, if length > 0, otherwise its value isn’t changed.

false ^^^^^

1r ^^

A list of statements.

Returns the set of targets for a MultiTargetNode or a MultiWriteNode.

Wonky heredoc tab/spaces rules. github.com/ruby/prism/blob/v1.3.0/src/prism.c#L10548-L10558

Search took: 2ms  ·  Total Results: 1250