command syntax is allowed in expressions
This commit is contained in:
parent
6fd008f23e
commit
79f59d18f1
4 changed files with 90 additions and 47 deletions
12
tests/parser/tcommand_as_expr.nim
Normal file
12
tests/parser/tcommand_as_expr.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
discard """
|
||||
output: "12"
|
||||
"""
|
||||
|
||||
proc foo(x: int): int = x-1
|
||||
proc foo(x, y: int): int = x-y
|
||||
|
||||
let x = foo 7.foo, # comment here
|
||||
foo(1, foo 8)
|
||||
# 12 = 6 - -6
|
||||
echo x
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue