Fixed - and + as unary operators, negative numbers, etc

This commit is contained in:
Nathan Braswell
2015-03-24 15:47:08 -04:00
parent b01078e7a0
commit 48dc1f8e4d
4 changed files with 33 additions and 12 deletions

View File

@@ -0,0 +1,5 @@
-1
1
-1
7
-7

View File

@@ -0,0 +1,14 @@
import io:*
|int| main() {
|int| a = -1
println(a)
println(-a)
println(+a); // this is still -1! (as C has it, anyway) (darn comment/semicolon interaction)
|int| b = 7
println(b)
println(-b)
return 0;
}