summary refs log tree commit diff stats
path: root/compiler/sem.nim
diff options
context:
space:
mode:
authorjcosborn <jcosborn@users.noreply.github.com>2018-04-19 15:39:18 -0500
committerAndreas Rumpf <rumpf_a@web.de>2018-04-19 22:39:18 +0200
commit7e15d5134bb4c98a96307d16621eb836543bb083 (patch)
treef666da8434bf46e1bbc4858e9d30d0104fac12e4 /compiler/sem.nim
parent34029263725ef931863ea73966dc08588758dada (diff)
downloadNim-7e15d5134bb4c98a96307d16621eb836543bb083.tar.gz
allow setting template/macro recursive evaluation limits (#7652)
* allow setting template/macro recursive evaluation limits

* revert setting template/macro eval limits
set them to 1000
Diffstat (limited to 'compiler/sem.nim')
-rw-r--r--compiler/sem.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/sem.nim b/compiler/sem.nim
index 4fef1bc60..041f2e127 100644
--- a/compiler/sem.nim
+++ b/compiler/sem.nim
@@ -377,7 +377,7 @@ proc semAfterMacroCall(c: PContext, call, macroResult: PNode,
   ## reassigned, and binding the unbound identifiers that the macro output
   ## contains.
   inc(evalTemplateCounter)
-  if evalTemplateCounter > 100:
+  if evalTemplateCounter > evalTemplateLimit:
     globalError(s.info, errTemplateInstantiationTooNested)
   c.friendModules.add(s.owner.getModule)