change DSL: assume nkInfix nodes imply a void context

This commit is contained in:
Andreas Rumpf 2017-08-28 12:15:58 +02:00
commit db0bba2c3f
2 changed files with 3 additions and 3 deletions

View file

@ -108,10 +108,10 @@ template observe(s: cstring): RString =
proc renderUser(u: User): VNode {.track.} = proc renderUser(u: User): VNode {.track.} =
result = buildHtml(tdiv): result = buildHtml(tdiv):
if u.selected: if u.selected:
!(firstname <- u.firstname) firstname <- u.firstname
tdiv: tdiv:
textInput firstname, focusA textInput firstname, focusA
!(lastname <- u.lastname) lastname <- u.lastname
tdiv: tdiv:
textInput lastname, focusB textInput lastname, focusB
else: else:

View file

@ -74,7 +74,7 @@ proc tcall2(n, tmpContext: NimNode): NimNode =
result = n result = n
of nnkVarSection, nnkLetSection, nnkConstSection: of nnkVarSection, nnkLetSection, nnkConstSection:
result = n result = n
of nnkCallKinds: of nnkCallKinds - {nnkInfix}:
let op = getName(n[0]) let op = getName(n[0])
let ck = isComponent(op) let ck = isComponent(op)
if ck != ComponentKind.None: if ck != ComponentKind.None: