/build/

alternate' title='Atom feed' href='https://git.tilde.institute/ahoang/Nim/atom/tests/lexer/tind1.nim?h=devel' type='application/atom+xml'/>
summary refs log blame commit diff stats
path: root/tests/lexer/tind1.nim
blob: 6a975d5beb6996e2ea64bc41aea7e95b8d1f3cc0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13

           
                                                           









                                                       
                                                




                  
 






               
discard """
  line: 24
  errormsg: "expression expected, but found 'keyword else'"
"""

import macros

# finally optional indentation in 'if' expressions :-):
var x = if 4 != 5:
    "yes"
  else:
    "no"

macro mymacro(n: expr): stmt {.immediate.} = nil

mymacro:
  echo "test"
else:
  echo "else part"


if 4 == 3:
  echo "bug"
  else:
  echo "no bug"