Small optimization for the token method.

This commit is contained in:
Chris Eppstein 2008-10-14 08:01:22 -07:00
parent 95e16e4ed9
commit 128d00df3d
1 changed files with 2 additions and 3 deletions

View File

@ -43,14 +43,13 @@ module Sass
end
def token
return if done?
if @tok
@tok, tok = nil, @tok
return tok
end
whitespace
return if done?
variable || string || number || color || bool || op || ident ||
(raise SyntaxError.new("Syntax error in '#{@scanner.string}' at '#{@scanner.rest}'."))
end