class Sass::Script::Parser

def parse_interpolated(warn_for_color = false)

Raises:
  • (Sass::SyntaxError) - if the expression isn't valid SassScript

Returns:
  • (Script::Tree::Node) - The root node of the parse tree

Parameters:
  • warn_for_color (Boolean) -- Whether raw color values passed to
def parse_interpolated(warn_for_color = false)
  # Start two characters back to compensate for #{
  start_pos = Sass::Source::Position.new(line, offset - 2)
  expr = assert_expr :expr
  assert_tok :end_interpolation
  expr = Sass::Script::Tree::Interpolation.new(
    nil, expr, nil, false, false, :warn_for_color => warn_for_color)
  check_for_interpolation expr
  expr.options = @options
  node(expr, start_pos)
rescue Sass::SyntaxError => e
  e.modify_backtrace :line => @lexer.line, :filename => @options[:filename]
  raise e
end