module Sass::Script
def self.parse(value, line, offset, filename = nil)
-
(Script::Node)
- The root node of the parse tree
Parameters:
-
filename
(String
) -- The path to the file in which the SassScript appeared. -
offset
(Fixnum
) -- The number of characters in on `line` that the SassScript started. -
line
(Fixnum
) -- The number of the line on which the SassScript appeared. -
value
(String
) -- The SassScript
def self.parse(value, line, offset, filename = nil) Parser.parse(value, line, offset, filename) rescue Sass::SyntaxError => e if e.message == "SassScript error" e.instance_eval do @message += ": #{value.dump}." end end e.sass_line = line raise e end
def self.resolve(value, line, offset, environment)
-
(String)
- The string result of evaluating the SassScript
Parameters:
-
environment
(Sass::Environment
) -- The environment in which to evaluate the SassScript -
offset
(Fixnum
) -- The number of characters in on `line` that the SassScript started. -
line
(Fixnum
) -- The number of the line on which the SassScript appeared. -
value
(String
) -- The SassScript
def self.resolve(value, line, offset, environment) parse(value, line, offset).perform(environment).to_s end