Method: YARD::Parser::Ruby::Legacy::TokenList#squeeze

Defined in:
lib/yard/parser/ruby/legacy/token_list.rb

#squeeze(type = TkSPACE) ⇒ Object



37
38
39
40
# File 'lib/yard/parser/ruby/legacy/token_list.rb', line 37

def squeeze(type = TkSPACE)
  last = nil
  TokenList.new(map {|t| x = t.is_a?(type) && last.is_a?(type) ? nil : t; last = t; x })
end