all repos — min @ 57760f31ee3b238d7d56165ebd6c61fb0530dde5

A small but practical concatenative programming language.

Minor refactoring
h3rald h3rald@h3rald.com
Tue, 29 Dec 2020 21:03:44 +0000
commit

57760f31ee3b238d7d56165ebd6c61fb0530dde5

parent

49d5bd853a05be2751ea2eb685f73cff8f3e2241

1 files changed, 1 insertions(+), 17 deletions(-)

jump to
M core/interpreter.nimcore/interpreter.nim

@@ -316,24 +316,8 @@ proc rawCompile*(i: In, indent = ""): seq[string] {.discardable, extern:"min_exported_symbol_$1".} =

while i.parser.token != tkEof: if i.trace.len == 0: i.stackcopy = i.stack - try: + handleErrors(i) do: result.add i.parser.compileMinValue(i, push = true, indent) - except MinRuntimeError: - let msg = getCurrentExceptionMsg() - i.stack = i.stackcopy - error("$1:$2,$3 $4" % [i.currSym.filename, $i.currSym.line, $i.currSym.column, msg]) - i.stackTrace - i.trace = @[] - raise MinTrappedException(msg: msg) - except MinTrappedException: - raise - except: - let msg = getCurrentExceptionMsg() - i.stack = i.stackcopy - i.error(msg) - i.stackTrace - i.trace = @[] - raise MinTrappedException(msg: msg) proc compileFile*(i: In, main: bool): seq[string] {.discardable, extern:"min_exported_symbol_$1".} = result = newSeq[string](0)