summary refs log tree commit diff stats
path: root/tests/parser/tprecedence.nim
blob: d2c6d0b30779a2326dd682341ae16d473545cf79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
discard """
  output: '''holla
true'''
"""

# Test top level semicolon works properly:
import os; echo "holla"

# Test the new predence rules

proc `\+` (x, y: int): int = result = x + y
proc `\*` (x, y: int): int = result = x * y

echo 5 \+ 1 \* 9 == 6*9