ensure compiler API doesn't import the RST engine

This commit is contained in:
Andreas Rumpf
2018-05-29 08:22:09 +02:00
parent 06122ff711
commit a5701d6b71
2 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ import
magicsys, condsyms, idents, lexer, options, parampatterns, strutils, trees,
nimfix / pretty, lineinfos
when not defined(noDocgen):
when defined(booting) or defined(nimsuggest):
import docgen
type

View File

@@ -115,7 +115,7 @@ proc symToSuggest(conf: ConfigRef; s: PSym, isLocal: bool, section: IdeCmd, info
result.forth = typeToString(s.typ)
else:
result.forth = ""
when not defined(noDocgen):
when defined(nimsuggest) and not defined(noDocgen):
result.doc = s.extractDocComment
let infox = if section in {ideUse, ideHighlight, ideOutline}: info else: s.info
result.filePath = toFullPath(conf, infox)
@@ -153,7 +153,7 @@ proc `$`*(suggest: Suggest): string =
result.add(sep)
result.add($suggest.column)
result.add(sep)
when not defined(noDocgen):
when defined(nimsuggest) and not defined(noDocgen):
result.add(suggest.doc.escape)
if suggest.version == 0:
result.add(sep)