finally de-deprecate the .define and .undef pragmas

This commit is contained in:
Andreas Rumpf
2020-04-04 23:12:24 +02:00
parent 9c46927fad
commit a890aa75aa
2 changed files with 1 additions and 2 deletions

View File

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

View File

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