Deprecate oldNewlines, clean out deprecated code from oldNewlines (#14763)
This commit is contained in:
parent
79ed8e79ef
commit
c3459c7b14
4 changed files with 2 additions and 17 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -684,12 +684,7 @@ 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:
|
tok.literal.add('\L')
|
||||||
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')
|
|
||||||
inc(L.bufpos)
|
inc(L.bufpos)
|
||||||
of 'p', 'P':
|
of 'p', 'P':
|
||||||
if tok.tokType == tkCharLit:
|
if tok.tokType == tkCharLit:
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue