remove stdlib case transitions (#11401)

This commit is contained in:
Jasper Jenkins 2019-06-04 23:04:29 -07:00 • committed by Andreas Rumpf
commit 71388caf2e
3 changed files with 6 additions and 4 deletions

View file

@ -391,8 +391,10 @@ proc ignoreMsg*(c: CfgParser, e: CfgEvent): string {.rtl, extern: "npc$1".} =
proc getKeyValPair(c: var CfgParser, kind: CfgEventKind): CfgEvent =
if c.tok.kind == tkSymbol:
result = CfgEvent(kind: cfgKeyValuePair, key: c.tok.literal, value: "")
result.kind = kind
case kind
of cfgOption, cfgKeyValuePair:
result = CfgEvent(kind: kind, key: c.tok.literal, value: "")
else: discard
rawGetTok(c, c.tok)
if c.tok.kind in {tkEquals, tkColon}:
rawGetTok(c, c.tok)