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
commit c3459c7b14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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`); - `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. passing `--project` now automatically generates an index and enables search.
See [docgen](docgen.html#introduction-quick-start) for details. See [docgen](docgen.html#introduction-quick-start) for details.
- Deprecated `--oldNewlines` and its Deprecated code cleaned out.
## Tool changes ## Tool changes

View file

@ -582,16 +582,6 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
else: else:
undefSymbol(conf.symbols, "hotcodereloading") undefSymbol(conf.symbols, "hotcodereloading")
undefSymbol(conf.symbols, "useNimRtl") 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 "laxstrings": processOnOffSwitch(conf, {optLaxStrings}, arg, pass, info)
of "nilseqs": processOnOffSwitch(conf, {optNilSeqs}, arg, pass, info) of "nilseqs": processOnOffSwitch(conf, {optNilSeqs}, arg, pass, info)
of "oldast": processOnOffSwitch(conf, {optOldAst}, arg, pass, info) of "oldast": processOnOffSwitch(conf, {optOldAst}, arg, pass, info)

View file

@ -684,11 +684,6 @@ proc getEscapedChar(L: var TLexer, tok: var TToken) =
inc(L.bufpos) # skip '\' inc(L.bufpos) # skip '\'
case L.buf[L.bufpos] case L.buf[L.bufpos]
of 'n', 'N': 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) inc(L.bufpos)
of 'p', 'P': of 'p', 'P':

View file

@ -101,7 +101,6 @@ Advanced options:
--excessiveStackTrace:on|off --excessiveStackTrace:on|off
stack traces use full file paths stack traces use full file paths
--stackTraceMsgs:on|off enable user defined stack frame msgs via `setFrameMsg` --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 --laxStrings:on|off when turned on, accessing the zero terminator in
strings is allowed; only for backwards compatibility strings is allowed; only for backwards compatibility
--nilseqs:on|off allow 'nil' for strings/seqs for --nilseqs:on|off allow 'nil' for strings/seqs for