finally de-deprecate the .define and .undef pragmas
This commit is contained in:
parent
9c46927fad
commit
a890aa75aa
2 changed files with 1 additions and 2 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
## Compiler changes
|
## Compiler changes
|
||||||
|
|
||||||
- Specific warnings can now be turned into errors via `--warningAsError[X]:on|off`.
|
- Specific warnings can now be turned into errors via `--warningAsError[X]:on|off`.
|
||||||
|
- The `define` and `undef` pragmas have been de-deprecated.
|
||||||
|
|
||||||
## Tool changes
|
## Tool changes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -470,14 +470,12 @@ proc processPop(c: PContext, n: PNode) =
|
||||||
proc processDefine(c: PContext, n: PNode) =
|
proc processDefine(c: PContext, n: PNode) =
|
||||||
if (n.kind in nkPragmaCallKinds and n.len == 2) and (n[1].kind == nkIdent):
|
if (n.kind in nkPragmaCallKinds and n.len == 2) and (n[1].kind == nkIdent):
|
||||||
defineSymbol(c.config.symbols, n[1].ident.s)
|
defineSymbol(c.config.symbols, n[1].ident.s)
|
||||||
message(c.config, n.info, warnDeprecated, "define is deprecated")
|
|
||||||
else:
|
else:
|
||||||
invalidPragma(c, n)
|
invalidPragma(c, n)
|
||||||
|
|
||||||
proc processUndef(c: PContext, n: PNode) =
|
proc processUndef(c: PContext, n: PNode) =
|
||||||
if (n.kind in nkPragmaCallKinds and n.len == 2) and (n[1].kind == nkIdent):
|
if (n.kind in nkPragmaCallKinds and n.len == 2) and (n[1].kind == nkIdent):
|
||||||
undefSymbol(c.config.symbols, n[1].ident.s)
|
undefSymbol(c.config.symbols, n[1].ident.s)
|
||||||
message(c.config, n.info, warnDeprecated, "undef is deprecated")
|
|
||||||
else:
|
else:
|
||||||
invalidPragma(c, n)
|
invalidPragma(c, n)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue