Files
clang-p2996/lldb/source/Interpreter/ScriptInterpreterNone.cpp
Johnny Chen 7dc2e4784e We can do better when reporting the status of one-liner script execution.
Change the prototype of ScriptInterpreter::ExecuteOneLine() to return bool
instead of void and take one additional parameter as CommandReturnObject *.

Propagate the status of one-liner execution back appropriately.

llvm-svn: 109899
2010-07-30 22:33:14 +00:00

42 lines
1.2 KiB
C++

//===-- ScriptInterpreterNone.cpp -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "lldb/Interpreter/ScriptInterpreterNone.h"
#include "lldb/Core/Stream.h"
#include "lldb/Core/StringList.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Interpreter/CommandInterpreter.h"
using namespace lldb;
using namespace lldb_private;
ScriptInterpreterNone::ScriptInterpreterNone (CommandInterpreter &interpreter) :
ScriptInterpreter (eScriptLanguageNone)
{
}
ScriptInterpreterNone::~ScriptInterpreterNone ()
{
}
bool
ScriptInterpreterNone::ExecuteOneLine (CommandInterpreter &interpreter, const char *command, CommandReturnObject *)
{
interpreter.GetDebugger().GetErrorStream().PutCString ("error: there is no embedded script interpreter in this mode.\n");
return false;
}
void
ScriptInterpreterNone::ExecuteInterpreterLoop (CommandInterpreter &interpreter)
{
interpreter.GetDebugger().GetErrorStream().PutCString ("error: there is no embedded script interpreter in this mode.\n");
}