From aaf06dba1b76dc90c6678ee38934d8c23ae1f93d Mon Sep 17 00:00:00 2001 From: Andy Davidoff Date: Wed, 6 Nov 2019 15:26:03 -0500 Subject: [PATCH] restore --define:key:val in nim.cfg and fix #12367 (#12611) (cherry picked from commit 5544a13236b9131b4d2737045e505d4bbf5a98a2) --- compiler/nimconf.nim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim index a470179bdd..351ae0c8ab 100644 --- a/compiler/nimconf.nim +++ b/compiler/nimconf.nim @@ -190,6 +190,12 @@ proc parseAssignment(L: var TLexer, tok: var TToken; checkSymbol(L, tok) add(val, $tok) confTok(L, tok, config, condStack) # skip symbol + if tok.tokType in {tkColon, tkEquals}: + add(val, $tok) # add the : + confTok(L, tok, config, condStack) # skip symbol + checkSymbol(L, tok) + add(val, $tok) # add the token after it + confTok(L, tok, config, condStack) # skip symbol while tok.ident != nil and tok.ident.s == "&": confTok(L, tok, config, condStack) checkSymbol(L, tok)