Actual fix for #40

This commit is contained in:
Felix Krause 2017-06-30 16:45:32 +02:00
parent 8a83272341
commit 15f8995ae2
1 changed files with 3 additions and 1 deletions

View File

@ -74,7 +74,9 @@ type
macro typeHintStateMachine(c: untyped, content: varargs[untyped]): typed = macro typeHintStateMachine(c: untyped, content: varargs[untyped]): typed =
yAssert content.kind == nnkArgList yAssert content.kind == nnkArgList
result = newNimNode(nnkCaseStmt, content).add(copyNimNode(c)) 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 yAssert branch.kind == nnkOfBranch
var var
charBranch = newNimNode(nnkOfBranch, branch) charBranch = newNimNode(nnkOfBranch, branch)