Method: Sass::Script::Lexer#unpeek!

Defined in:
lib/sass/script/lexer.rb

#unpeek!

Rewinds the underlying StringScanner to before the token returned by #peek.


210
211
212
213
214
215
216
# File 'lib/sass/script/lexer.rb', line 210

def unpeek!
  raise "[BUG] Can't unpeek before a queued token!" if @next_tok
  return unless @tok
  @scanner.pos = @tok.pos
  @line = @tok.source_range.start_pos.line
  @offset = @tok.source_range.start_pos.offset
end