diff options
author | Juan Carlos <juancarlospaco@gmail.com> | 2020-06-23 06:22:07 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 11:22:07 +0200 |
commit | c3459c7b148cd00d85b01ddae74782648a5d4e37 (patch) | |
tree | 8d96ff466a5143642f63bd170939c274ca446c00 /compiler | |
parent | 79ed8e79efa49f49e1c522ea803d0317e05f0462 (diff) | |
download | Nim-c3459c7b148cd00d85b01ddae74782648a5d4e37.tar.gz |
Deprecate oldNewlines, clean out deprecated code from oldNewlines (#14763)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/commands.nim | 10 | ||||
-rw-r--r-- | compiler/lexer.nim | 7 |
2 files changed, 1 insertions, 16 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim index c945a633a..6dccbcd00 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -582,16 +582,6 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; else: undefSymbol(conf.symbols, "hotcodereloading") undefSymbol(conf.symbols, "useNimRtl") - of "oldnewlines": - case arg.normalize - of "", "on": - conf.oldNewlines = true - defineSymbol(conf.symbols, "nimOldNewlines") - of "off": - conf.oldNewlines = false - undefSymbol(conf.symbols, "nimOldNewlines") - else: - localError(conf, info, errOnOrOffExpectedButXFound % arg) of "laxstrings": processOnOffSwitch(conf, {optLaxStrings}, arg, pass, info) of "nilseqs": processOnOffSwitch(conf, {optNilSeqs}, arg, pass, info) of "oldast": processOnOffSwitch(conf, {optOldAst}, arg, pass, info) diff --git a/compiler/lexer.nim b/compiler/lexer.nim index bd71a6ad5..f9679adee 100644 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -684,12 +684,7 @@ proc getEscapedChar(L: var TLexer, tok: var TToken) = inc(L.bufpos) # skip '\' case L.buf[L.bufpos] of 'n', 'N': - if L.config.oldNewlines: - if tok.tokType == tkCharLit: - lexMessage(L, errGenerated, "\\n not allowed in character literal") - tok.literal.add(L.config.target.tnl) - else: - tok.literal.add('\L') + tok.literal.add('\L') inc(L.bufpos) of 'p', 'P': if tok.tokType == tkCharLit: |