class PowerAssert::Parser

def valid_syntax?(str)

def valid_syntax?(str)
  return true unless defined?(RubyVM)
  begin
    verbose, $VERBOSE = $VERBOSE, nil
    RubyVM::InstructionSequence.compile(str)
    true
  rescue SyntaxError
    false
  ensure
    $VERBOSE = verbose
  end
end