mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
nimeval errorHook support (#15255)
This commit is contained in:
@@ -10,9 +10,9 @@
|
||||
## exposes the Nim VM to clients.
|
||||
import
|
||||
ast, astalgo, modules, passes, condsyms,
|
||||
options, sem, semdata, llstream, vm, vmdef,
|
||||
modulegraphs, idents, os, pathutils, passaux,
|
||||
scriptconfig
|
||||
options, sem, semdata, llstream, lineinfos, vm,
|
||||
vmdef, modulegraphs, idents, os, pathutils,
|
||||
passaux, scriptconfig
|
||||
|
||||
type
|
||||
Interpreter* = ref object ## Use Nim as an interpreter with this object
|
||||
@@ -134,6 +134,11 @@ proc destroyInterpreter*(i: Interpreter) =
|
||||
## destructor.
|
||||
discard "currently nothing to do."
|
||||
|
||||
proc registerErrorHook*(i: Interpreter, hook:
|
||||
proc (config: ConfigRef; info: TLineInfo; msg: string;
|
||||
severity: Severity) {.gcsafe.}) =
|
||||
i.graph.config.structuredErrorHook = hook
|
||||
|
||||
proc runRepl*(r: TLLRepl;
|
||||
searchPaths: openArray[string];
|
||||
supportNimscript: bool) =
|
||||
|
||||
Reference in New Issue
Block a user