1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] [SCSS] Document sass/scss/script_parser.rb.

This commit is contained in:
Nathan Weizenbaum 2009-12-31 20:49:35 -08:00
parent d2f8d14cb0
commit f028f4c43c

View file

@ -1,8 +1,14 @@
module Sass module Sass
module SCSS module SCSS
# A subclass of {Sass::Script::Parser}
# that can be used as a subcomponent of {SCSS::Parser}.
# In particular, the parser doesn't raise an error
# when there's more content in the lexer once lexing is done.
class ScriptParser < Sass::Script::Parser class ScriptParser < Sass::Script::Parser
private private
# Instead of raising an error when the parser is done,
# rewind the StringScanner so that it hasn't consumed the final token.
def assert_done def assert_done
@lexer.unpeek! @lexer.unpeek!
end end