Deprecate oldNewlines, clean out deprecated code from oldNewlines (#14763)

This commit is contained in:
Juan Carlos
2020-06-23 06:22:07 -03:00
committed by GitHub
parent 79ed8e79ef
commit c3459c7b14
4 changed files with 2 additions and 17 deletions

View File

@@ -218,5 +218,6 @@ proc mydiv(a, b): int {.raises: [].} =
- `nim doc` now outputs under `$projectPath/htmldocs` when `--outdir` is unspecified (with or without `--project`);
passing `--project` now automatically generates an index and enables search.
See [docgen](docgen.html#introduction-quick-start) for details.
- Deprecated `--oldNewlines` and its Deprecated code cleaned out.
## Tool changes

View File

@@ -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)

View File

@@ -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:

View File

@@ -101,7 +101,6 @@ Advanced options:
--excessiveStackTrace:on|off
stack traces use full file paths
--stackTraceMsgs:on|off enable user defined stack frame msgs via `setFrameMsg`
--oldNewlines:on|off turn on|off the old behaviour of "\n"
--laxStrings:on|off when turned on, accessing the zero terminator in
strings is allowed; only for backwards compatibility
--nilseqs:on|off allow 'nil' for strings/seqs for