xo-interpreter2 stack: wrap TokenizerError as DRuntimeError
Also fix _read_eval_print() to report them!
This commit is contained in:
parent
1d3af64a7a
commit
ff471bbc72
4 changed files with 22 additions and 0 deletions
|
|
@ -54,6 +54,20 @@ namespace xo {
|
|||
}
|
||||
}
|
||||
|
||||
DString *
|
||||
TokenizerError::report_to_string(obj<AAllocator> dest_mm) const
|
||||
{
|
||||
// FIXME:
|
||||
// using heap here for scratch space.
|
||||
// Would prefer to checkpoint + realloc.
|
||||
|
||||
std::stringstream ss;
|
||||
|
||||
this->report(ss);
|
||||
|
||||
return DString::from_str(dest_mm, ss.str());
|
||||
}
|
||||
|
||||
} /*namespace scm*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue