Class Index [+]

Quicksearch

Sass::SCSS::StaticParser

A parser for a static SCSS tree. Parses with SCSS extensions, like nested rules and parent selectors, but without dynamic SassScript. This is useful for e.g. {#parse_selector parsing selectors} after resolving the interpolation.

Public Instance Methods

parse_selector(filename) click to toggle source

Parses the text as a selector.

@param line [Fixnum] The line on which the selector appears.

  Used for error reporting

@param filename [String, nil] The file in which the selector appears,

  or nil if there is no such file.
  Used for error reporting

@return [Selector::CommaSequence] The parsed selector @raise [Sass::SyntaxError] if there’s a syntax error in the selector

    # File lib/sass/scss/static_parser.rb, line 18
18:       def parse_selector(filename)
19:         init_scanner!
20:         seq = expr!(:selector_comma_sequence)
21:         expected("selector") unless @scanner.eos?
22:         seq.line = @line
23:         seq.filename = filename
24:         seq
25:       end

Private Instance Methods

interp_ident(ident = IDENT) click to toggle source
    # File lib/sass/scss/static_parser.rb, line 33
33:       def interp_ident(ident = IDENT); s = tok(ident) and [s]; end
interp_string() click to toggle source
    # File lib/sass/scss/static_parser.rb, line 32
32:       def interp_string; s = tok(STRING) and [s]; end
interpolation() click to toggle source
    # File lib/sass/scss/static_parser.rb, line 31
31:       def interpolation; nil; end
script_value() click to toggle source
    # File lib/sass/scss/static_parser.rb, line 30
30:       def script_value; nil; end
special_directive(name) click to toggle source
    # File lib/sass/scss/static_parser.rb, line 36
36:       def special_directive(name)
37:         return unless name == 'media' || name == 'import'
38:         super
39:       end
use_css_import?() click to toggle source
    # File lib/sass/scss/static_parser.rb, line 34
34:       def use_css_import?; true; end
variable() click to toggle source
    # File lib/sass/scss/static_parser.rb, line 29
29:       def variable; nil; end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.