Method: Sass::SCSS::Parser#initialize

Defined in:
lib/sass/scss/parser.rb

#initialize(str, filename, line = 1) ⇒ Parser

Returns a new instance of Parser.

Parameters:

  • str (String, StringScanner)

    The source document to parse. Note that Parser won't raise a nice error message if this isn't properly parsed; for that, you should use the higher-level Engine or CSS.

  • filename (String)

    The name of the file being parsed. Used for warnings.

  • line (Fixnum) (defaults to: 1)

    The line on which the source string appeared, if it's part of another document.



14
15
16
17
18
19
# File 'lib/sass/scss/parser.rb', line 14

def initialize(str, filename, line = 1)
  @template = str
  @filename = filename
  @line = line
  @strs = []
end