From 057b53e1394962f43afba8e3e0a73f91bca68fe0 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 8 Aug 2014 02:24:19 +0200 Subject: [PATCH] 'lambda' is no keyword anymore --- compiler/lexer.nim | 4 ++-- compiler/renderer.nim | 2 +- compiler/wordrecg.nim | 4 ++-- doc/keywords.txt | 2 +- lib/packages/docutils/highlite.nim | 2 +- web/news.txt | 1 + 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/compiler/lexer.nim b/compiler/lexer.nim index 0e4dfc2ac..ea51a1399 100644 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -40,7 +40,7 @@ type tkFinally, tkFor, tkFrom, tkGeneric, tkIf, tkImport, tkIn, tkInclude, tkInterface, tkIs, tkIsnot, tkIterator, - tkLambda, tkLet, + tkLet, tkMacro, tkMethod, tkMixin, tkMod, tkNil, tkNot, tkNotin, tkObject, tkOf, tkOr, tkOut, tkProc, tkPtr, tkRaise, tkRef, tkReturn, tkShl, tkShr, tkStatic, @@ -75,7 +75,7 @@ const "elif", "else", "end", "enum", "except", "export", "finally", "for", "from", "generic", "if", "import", "in", "include", "interface", "is", "isnot", "iterator", - "lambda", "let", + "let", "macro", "method", "mixin", "mod", "nil", "not", "notin", "object", "of", "or", "out", "proc", "ptr", "raise", "ref", "return", diff --git a/compiler/renderer.nim b/compiler/renderer.nim index 0b1312ccc..c97b2f321 100644 --- a/compiler/renderer.nim +++ b/compiler/renderer.nim @@ -925,7 +925,7 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) = of nkCheckedFieldExpr, nkHiddenAddr, nkHiddenDeref: gsub(g, n.sons[0]) of nkLambda: - putWithSpace(g, tkLambda, "proc") + putWithSpace(g, tkProc, "proc") gsub(g, n.sons[paramsPos]) gsub(g, n.sons[pragmasPos]) put(g, tkSpaces, Space) diff --git a/compiler/wordrecg.nim b/compiler/wordrecg.nim index c0550f702..96056eb6f 100644 --- a/compiler/wordrecg.nim +++ b/compiler/wordrecg.nim @@ -27,7 +27,7 @@ type wContinue, wConverter, wDiscard, wDistinct, wDiv, wDo, wElif, wElse, wEnd, wEnum, wExcept, wExport, wFinally, wFor, wFrom, wGeneric, wIf, wImport, wIn, - wInclude, wInterface, wIs, wIsnot, wIterator, wLambda, wLet, + wInclude, wInterface, wIs, wIsnot, wIterator, wLet, wMacro, wMethod, wMixin, wMod, wNil, wNot, wNotin, wObject, wOf, wOr, wOut, wProc, wPtr, wRaise, wRef, wReturn, wShl, wShr, wStatic, wTemplate, wTry, wTuple, wType, wUsing, wVar, @@ -107,7 +107,7 @@ const "elif", "else", "end", "enum", "except", "export", "finally", "for", "from", "generic", "if", "import", "in", "include", "interface", "is", "isnot", "iterator", - "lambda", "let", + "let", "macro", "method", "mixin", "mod", "nil", "not", "notin", "object", "of", "or", "out", "proc", "ptr", "raise", "ref", "return", diff --git a/doc/keywords.txt b/doc/keywords.txt index 60b100398..a43b35475 100644 --- a/doc/keywords.txt +++ b/doc/keywords.txt @@ -6,7 +6,7 @@ elif else end enum except export finally for from generic if import in include interface is isnot iterator -lambda let +let macro method mixin mod nil not notin object of or out diff --git a/lib/packages/docutils/highlite.nim b/lib/packages/docutils/highlite.nim index 80fbf3a51..ff371f4e1 100644 --- a/lib/packages/docutils/highlite.nim +++ b/lib/packages/docutils/highlite.nim @@ -50,7 +50,7 @@ const "break", "case", "cast", "const", "continue", "converter", "discard", "distinct", "div", "do", "elif", "else", "end", "enum", "except", "export", "finally", "for", "from", "generic", "if", "import", "in", "include", - "interface", "is", "isnot", "iterator", "lambda", "let", "macro", "method", + "interface", "is", "isnot", "iterator", "let", "macro", "method", "mixin", "mod", "nil", "not", "notin", "object", "of", "or", "out", "proc", "ptr", "raise", "ref", "return", "shl", "shr", "static", "template", "try", "tuple", "type", "using", "var", "when", "while", "with", diff --git a/web/news.txt b/web/news.txt index 3aca10692..20e241221 100644 --- a/web/news.txt +++ b/web/news.txt @@ -22,6 +22,7 @@ News of the new ``TUri`` type in the ``uri`` module. - The ``destructor`` pragma has been deprecated. Use the ``override`` pragma instead. The destructor's name has to be ``destroy`` now. + - ``lambda`` is not a keyword anymore. Language Additions ------------------