diff options
author | hlaaftana <10591326+hlaaftana@users.noreply.github.com> | 2021-02-08 21:35:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-08 19:35:06 +0100 |
commit | 6a7baff97dd0800712b60b7b685ff23f66b9d127 (patch) | |
tree | 127dabe830ba5498471e90f3bdc241960e0122f8 /compiler | |
parent | abac35e7437dd1ac2b3687dfa51de7f9d4b6e853 (diff) | |
download | Nim-6a7baff97dd0800712b60b7b685ff23f66b9d127.tar.gz |
rename case statement macro from match to `case` (#16923)
* rename case statement macro from match to `case` * fix test
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semstmts.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index c7aabea23..2c4672dfc 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -861,10 +861,10 @@ proc handleForLoopMacro(c: PContext; n: PNode; flags: TExprFlags): PNode = proc handleCaseStmtMacro(c: PContext; n: PNode; flags: TExprFlags): PNode = # n[0] has been sem'checked and has a type. We use this to resolve - # 'match(n[0])' but then we pass 'n' to the 'match' macro. This seems to + # '`case`(n[0])' but then we pass 'n' to the `case` macro. This seems to # be the best solution. var toResolve = newNodeI(nkCall, n.info) - toResolve.add newIdentNode(getIdent(c.cache, "match"), n.info) + toResolve.add newIdentNode(getIdent(c.cache, "case"), n.info) toResolve.add n[0] var errors: CandidateErrors @@ -875,7 +875,7 @@ proc handleCaseStmtMacro(c: PContext; n: PNode; flags: TExprFlags): PNode = markUsed(c, n[0].info, match) onUse(n[0].info, match) - # but pass 'n' to the 'match' macro, not 'n[0]': + # but pass 'n' to the `case` macro, not 'n[0]': r.call[1] = n let toExpand = semResolvedCall(c, r, r.call, {}) case match.kind |