Method: Sass::Script.parse

Defined in:
lib/sass/script.rb

.parse(value, line, offset, options = {}) ⇒ Script::Tree::Node

Parses a string of SassScript

Parameters:

  • value (String)

    The SassScript

  • line (Integer)

    The number of the line on which the SassScript appeared. Used for error reporting

  • offset (Integer)

    The number of characters in on line that the SassScript started. Used for error reporting

  • options ({Symbol => Object}) (defaults to: {})

    An options hash; see the Sass options documentation

Returns:

[View source]

26
27
28
29
30
31
32
# File 'lib/sass/script.rb', line 26

def self.parse(value, line, offset, options = {})
  Parser.parse(value, line, offset, options)
rescue Sass::SyntaxError => e
  e.message << ": #{value.inspect}." if e.message == "SassScript error"
  e.modify_backtrace(:line => line, :filename => options[:filename])
  raise e
end