Debian Codegraph @

tests/indent/nim.nim

raw
1 proc greet(name: string): string =
2 result = "hello, " & name
3
4 iterator items(n: int): int =
5 for i in 0 .. n:
6 yield i
7
8 for i in 0 .. 10:
9 echo i
10
11 while running:
12 step()
13
14 case n
15 of 1:
16 echo "one"
17 of 2:
18 echo "two"
19 else:
20 echo "many"