class Sass::Repl

def parse_input(environment, text)

def parse_input(environment, text)
  case text
  when Script::MATCH
    name = $1
    guarded = $3 == '||=' || $4
    val = Script::Parser.parse($3, @line, text.size - $3.size)
    unless guarded && environment.var(name)
      environment.set_var(name, val.perform(environment))
    end
    p environment.var(name)
  else
    p Script::Parser.parse(text, @line, 0).perform(environment)
  end
rescue Sass::SyntaxError => e
  puts "SyntaxError: #{e.message}"
  if @options[:trace]
    e.backtrace.each do |e|
      puts "\tfrom #{e}"
    end
  end
end