Small optimization for the token method.
This commit is contained in:
parent
95e16e4ed9
commit
128d00df3d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue