From 15f8995ae2bc76eed63ea118d19c08e61044af22 Mon Sep 17 00:00:00 2001 From: Felix Krause Date: Fri, 30 Jun 2017 16:45:32 +0200 Subject: [PATCH] Actual fix for #40 --- yaml/hints.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yaml/hints.nim b/yaml/hints.nim index e4ef3f9..05a457d 100644 --- a/yaml/hints.nim +++ b/yaml/hints.nim @@ -74,7 +74,9 @@ type macro typeHintStateMachine(c: untyped, content: varargs[untyped]): typed = yAssert content.kind == nnkArgList result = newNimNode(nnkCaseStmt, content).add(copyNimNode(c)) - for branch in content.children: + for branchStmt in content: + let branch = branchStmt[0] + echo $branch.kind yAssert branch.kind == nnkOfBranch var charBranch = newNimNode(nnkOfBranch, branch)