minor improvements

This commit is contained in:
Araq 2014-12-28 00:52:10 +01:00
commit 03afbe00b9
2 changed files with 4 additions and 4 deletions

View file

@ -1433,7 +1433,7 @@ proc eat(p: var PegParser, kind: TTokKind) =
if p.tok.kind == kind: getTok(p) if p.tok.kind == kind: getTok(p)
else: pegError(p, tokKindToStr[kind] & " expected") else: pegError(p, tokKindToStr[kind] & " expected")
proc parseExpr(p: var PegParser): Peg proc parseExpr(p: var PegParser): Peg {.gcsafe.}
proc getNonTerminal(p: var PegParser, name: string): NonTerminal = proc getNonTerminal(p: var PegParser, name: string): NonTerminal =
for i in 0..high(p.nonterms): for i in 0..high(p.nonterms):

View file

@ -296,7 +296,7 @@ when not defined(noSignalHandler):
template processSignal(s, action: expr) {.immediate, dirty.} = template processSignal(s, action: expr) {.immediate, dirty.} =
if s == SIGINT: action("SIGINT: Interrupted by Ctrl-C.\n") if s == SIGINT: action("SIGINT: Interrupted by Ctrl-C.\n")
elif s == SIGSEGV: elif s == SIGSEGV:
action("SIGSEGV: Illegal storage access. (Attempt to read from nil?)\n") action("SIGSEGV: Illegal storage access. (Try to compile with -d:useSysAssert -d:useGcAssert for details.)\n")
elif s == SIGABRT: elif s == SIGABRT:
when defined(endb): when defined(endb):
if dbgAborting: return # the debugger wants to abort if dbgAborting: return # the debugger wants to abort
@ -304,7 +304,7 @@ when not defined(noSignalHandler):
elif s == SIGFPE: action("SIGFPE: Arithmetic error.\n") elif s == SIGFPE: action("SIGFPE: Arithmetic error.\n")
elif s == SIGILL: action("SIGILL: Illegal operation.\n") elif s == SIGILL: action("SIGILL: Illegal operation.\n")
elif s == SIGBUS: elif s == SIGBUS:
action("SIGBUS: Illegal storage access. (Attempt to read from nil?)\n") action("SIGBUS: Illegal storage access. (Try to compile with -d:useSysAssert -d:useGcAssert for details.)\n")
else: else:
block platformSpecificSignal: block platformSpecificSignal:
when declared(SIGPIPE): when declared(SIGPIPE):