Method: Sass::Script::Lexer#expected!

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

#expected!(name)

Raise an error to the effect that name was expected in the input stream and wasn't found.

This calls #unpeek! to rewind the scanner to immediately after the last returned token.

Parameters:

  • name (String)

    The name of the entity that was expected but not found

Raises:

[View source]

238
239
240
241
# File 'lib/sass/script/lexer.rb', line 238

def expected!(name)
  unpeek!
  Sass::SCSS::Parser.expected(@scanner, name, @line)
end