idetools: 'usages' and 'def' should work now; documented js backend
This commit is contained in:
parent
a7a2f464a2
commit
c7158af752
14 changed files with 215 additions and 117 deletions
|
|
@ -526,7 +526,7 @@ proc `??`* (info: TLineInfo, filename: string): bool =
|
|||
# only for debugging purposes
|
||||
result = filename in info.toFilename
|
||||
|
||||
var checkPoints: seq[TLineInfo] = @[]
|
||||
var checkPoints*: seq[TLineInfo] = @[]
|
||||
|
||||
proc addCheckpoint*(info: TLineInfo) =
|
||||
checkPoints.add(info)
|
||||
|
|
@ -541,6 +541,7 @@ proc OutWriteln*(s: string) =
|
|||
proc MsgWriteln*(s: string) =
|
||||
## Writes to stdout. If --stdout option is given, writes to stderr instead.
|
||||
if gSilence == 0:
|
||||
if gCmd == cmdIdeTools and optCDebug notin gGlobalOptions: return
|
||||
if optStdout in gGlobalOptions: Writeln(stderr, s)
|
||||
else: Writeln(stdout, s)
|
||||
|
||||
|
|
@ -587,7 +588,7 @@ proc handleError(msg: TMsgKind, eh: TErrorHandling, s: string) =
|
|||
elif eh == doRaise:
|
||||
raiseRecoverableError(s)
|
||||
|
||||
proc `==`(a, b: TLineInfo): bool =
|
||||
proc `==`*(a, b: TLineInfo): bool =
|
||||
result = a.line == b.line and a.fileIndex == b.fileIndex
|
||||
|
||||
proc writeContext(lastinfo: TLineInfo) =
|
||||
|
|
@ -637,7 +638,7 @@ proc liMessage(info: TLineInfo, msg: TMsgKind, arg: string,
|
|||
frmt = posErrorFormat
|
||||
# we try to filter error messages so that not two error message
|
||||
# in the same file and line are produced:
|
||||
ignoreMsg = lastError == info and eh != doAbort
|
||||
#ignoreMsg = lastError == info and eh != doAbort
|
||||
lastError = info
|
||||
of warnMin..warnMax:
|
||||
ignoreMsg = optWarns notin gOptions or msg notin gNotes
|
||||
|
|
@ -661,7 +662,6 @@ proc GlobalError*(info: TLineInfo, msg: TMsgKind, arg = "") =
|
|||
liMessage(info, msg, arg, doRaise)
|
||||
|
||||
proc LocalError*(info: TLineInfo, msg: TMsgKind, arg = "") =
|
||||
#if gCmd == cmdIdeTools and gErrorCounter > 10: return
|
||||
liMessage(info, msg, arg, doNothing)
|
||||
|
||||
proc Message*(info: TLineInfo, msg: TMsgKind, arg = "") =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue