Add interface to cancel input continuation.

git-svn-id: http://root.cern.ch/svn/root/trunk@47803 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
Axel Naumann 2012-12-04 08:05:33 +00:00
parent 643a9c3284
commit 5ed01c266c
2 changed files with 8 additions and 0 deletions

View File

@ -129,6 +129,10 @@ namespace cling {
int process(const char* input_line, cling::StoredValueRef* result = 0,
Interpreter::CompilationResult* compRes = 0);
///\brief When continuation is requested, this cancels and ignores previous
/// input, resetting the continuation to a new line.
void cancelContinuation();
///\brief Executes a file given the CINT specific rules. Mainly used as:
/// .x filename[(args)], which in turn includes the filename and runs a
/// function with signature void filename(args)

View File

@ -82,6 +82,10 @@ namespace cling {
return 0;
}
void MetaProcessor::cancelContinuation() {
m_InputValidator->reset();
}
MetaProcessorOpts& MetaProcessor::getMetaProcessorOpts() {
// Take interpreter's state
m_Options.PrintingAST = m_Interp.isPrintingAST();