suggest: quote operators and keywords on suggestion (#10460)
This commit is contained in:
parent
690f21043d
commit
74a7b09412
2 changed files with 16 additions and 2 deletions
|
|
@ -33,7 +33,7 @@
|
|||
# included from sigmatch.nim
|
||||
|
||||
import algorithm, prefixmatches, lineinfos, pathutils
|
||||
from wordrecg import wDeprecated, wError
|
||||
from wordrecg import wDeprecated, wError, wAddr, wYield, specialWords
|
||||
|
||||
when defined(nimsuggest):
|
||||
import passes, tables # importer
|
||||
|
|
@ -109,7 +109,11 @@ proc symToSuggest(conf: ConfigRef; s: PSym, isLocal: bool, section: IdeCmd, info
|
|||
result.qualifiedPath.add(ow2.origModuleName)
|
||||
if ow != nil:
|
||||
result.qualifiedPath.add(ow.origModuleName)
|
||||
result.qualifiedPath.add(s.name.s)
|
||||
if s.name.s[0] in OpChars + {'[', '{', '('} or
|
||||
s.name.id in ord(wAddr)..ord(wYield):
|
||||
result.qualifiedPath.add('`' & s.name.s & '`')
|
||||
else:
|
||||
result.qualifiedPath.add(s.name.s)
|
||||
|
||||
if s.typ != nil:
|
||||
result.forth = typeToString(s.typ)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue