summary refs log tree commit diff stats
path: root/start.bat
blob: 7328211ca5c5808c7c360d724f1f6a483656669b (plain) (blame)
1
2
3
4
5
6
@echo off
REM COLOR 0A
SET NIMRODPATH=.
SET PATH=%NIMRODPATH%\bin;%NIMRODPATH%\dist\mingw\bin;%PATH%
cmd
Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
discard """
  output: '''3030
true
3'''
"""

template arithOps: expr = (`+` | `-` | `*`)
template testOr{ (arithOps{f})(a, b) }(a, b, f: expr): expr = f(a+1, b)

let xx = 10
echo 10*xx

template t{x = (~x){y} and (~x){z}}(x, y, z: bool): stmt =
  x = y
  if x: x = z

var
  a = true
  b = true
  c = false
a = b and a
echo a

# bug #798
template t012{(0|1|2){x}}(x: expr): expr = x+1
let z = 1
# outputs 3 thanks to fixpoint iteration:
echo z