class Unparser::AST::Enumerator

AST enumerator

def self.set(enumerable)

Other tags:
    Api: - private

Returns:
  • (Set) -

Parameters:
  • enumerable (Enumerable) --
def self.set(enumerable)
  enumerable.to_set.freeze
end

def self.type(node, type)

Other tags:
    Api: - private

Returns:
  • (Enumerable - Enumerable

Parameters:

  • type (Symbol) --
  • node (Parser::AST::Node) --
def self.type(node, type)
  new(node).type(type)
end

def each(&)

Other tags:
    Api: - private

Returns:
  • (self) -
  • (Enumerator) -
def each(&)
  Walker.call(node, controller, &)
end

def type(type)

Other tags:
    Api: - private

Returns:
  • (Enumerable) -

Parameters:
  • type (Symbol) --
def type(type)
  select { |node| node.type.equal?(type) }
end

def types(types)

Other tags:
    Api: - private

Returns:
  • (Enumerable) -

Parameters:
  • types (Enumerable) --
def types(types)
  select { |node| types.include?(node.type) }
end