mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 13:30:33 +00:00
finally de-deprecate the .define and .undef pragmas
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
## Compiler changes
|
||||
|
||||
- Specific warnings can now be turned into errors via `--warningAsError[X]:on|off`.
|
||||
- The `define` and `undef` pragmas have been de-deprecated.
|
||||
|
||||
## Tool changes
|
||||
|
||||
|
||||
@@ -470,14 +470,12 @@ proc processPop(c: PContext, n: PNode) =
|
||||
proc processDefine(c: PContext, n: PNode) =
|
||||
if (n.kind in nkPragmaCallKinds and n.len == 2) and (n[1].kind == nkIdent):
|
||||
defineSymbol(c.config.symbols, n[1].ident.s)
|
||||
message(c.config, n.info, warnDeprecated, "define is deprecated")
|
||||
else:
|
||||
invalidPragma(c, n)
|
||||
|
||||
proc processUndef(c: PContext, n: PNode) =
|
||||
if (n.kind in nkPragmaCallKinds and n.len == 2) and (n[1].kind == nkIdent):
|
||||
undefSymbol(c.config.symbols, n[1].ident.s)
|
||||
message(c.config, n.info, warnDeprecated, "undef is deprecated")
|
||||
else:
|
||||
invalidPragma(c, n)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user