mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-02 11:12:37 +00:00
Deprecate oldNewlines, clean out deprecated code from oldNewlines (#14763)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user