class SyntaxTree::Parser::TokenList

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/syntax_tree/parser.rbs

class SyntaxTree::Parser::TokenList
  
  type SyntaxTree__Parser__TokenList_<<_token = SyntaxTree::Op | SyntaxTree::Comma | SyntaxTree::TStringBeg | SyntaxTree::RBracket | SyntaxTree::Kw | SyntaxTree::LParen | SyntaxTree::RParen | SyntaxTree::LBracket | SyntaxTree::TStringEnd | SyntaxTree::EmbExprBeg | SyntaxTree::RegexpBeg | SyntaxTree::SymBeg | SyntaxTree::EmbExprEnd | SyntaxTree::LBrace
  
  def <<: (SyntaxTree__Parser__TokenList_<<_token token) -> untyped
  def []: (Integer index) -> untyped
  def delete: ((SyntaxTree::Ident | SyntaxTree::Kw | SyntaxTree::Const) value) -> untyped
  def delete_at: (Integer index) -> untyped
  def initialize: () -> void
  def rindex: () -> untyped
end

from the list for better error messages.
replacing a simple array because it keeps track of the last deleted token
This represents all of the tokens coming back from the lexer. It is

def <<(token)

Experimental RBS support (using type sampling data from the type_fusion project).

type SyntaxTree__Parser__TokenList_<<_token = SyntaxTree::Op | SyntaxTree::Comma | SyntaxTree::TStringBeg | SyntaxTree::RBracket | SyntaxTree::Kw | SyntaxTree::LParen | SyntaxTree::RParen | SyntaxTree::LBracket | SyntaxTree::TStringEnd | SyntaxTree::EmbExprBeg | SyntaxTree::RegexpBeg | SyntaxTree::SymBeg | SyntaxTree::EmbExprEnd | SyntaxTree::LBrace

def <<: (SyntaxTree__Parser__TokenList_<<_token token) -> untyped

This signature was generated using 176 samples from 1 application.

def <<(token)
  tokens << token
end

def [](index)

Experimental RBS support (using type sampling data from the type_fusion project).

def []: (Integer index) -> untyped

This signature was generated using 6 samples from 1 application.

def [](index)
  tokens[index]
end

def any?(&block)

def any?(&block)
  tokens.any?(&block)
end

def delete(value)

Experimental RBS support (using type sampling data from the type_fusion project).

def delete: ((SyntaxTree::Ident | SyntaxTree::Kw | SyntaxTree::Const) value) -> untyped

This signature was generated using 24 samples from 1 application.

def delete(value)
  @last_deleted = tokens.delete(value) || @last_deleted
end

def delete_at(index)

Experimental RBS support (using type sampling data from the type_fusion project).

def delete_at: (Integer index) -> untyped

This signature was generated using 123 samples from 1 application.

def delete_at(index)
  @last_deleted = tokens.delete_at(index)
end

def initialize

Experimental RBS support (using type sampling data from the type_fusion project).

def initialize: () -> void

This signature was generated using 1 sample from 1 application.

def initialize
  @tokens = []
  @last_deleted = nil
end

def reverse_each(&block)

def reverse_each(&block)
  tokens.reverse_each(&block)
end

def rindex(&block)

Experimental RBS support (using type sampling data from the type_fusion project).

def rindex: () -> untyped

This signature was generated using 155 samples from 1 application.

def rindex(&block)
  tokens.rindex(&block)
end