Mercurial > projects > dang
view test.td @ 2:ae5bbe4e7fd6
Lots of stuff, here are the git comments:
Lots of changes.
Now supports various integer-types in signed mode (byte, short, int, long)
Will cast back and forth when necessary
Doesnt check types and return type of functions is still hardcoded
Function return-types.
* Returned expressions are converted to the correct type for the function
* Callers get the correct type back
* Void functions work, and get an automatic "ret void" in the end
author | Anders Halager <halager@gmail.com> |
---|---|
date | Fri, 18 Apr 2008 02:31:07 +0200 |
parents | 2168f4cb73f1 |
children | 2c5a8f4c254a |
line wrap: on
line source
int x = 4; int main() { long var1 = 1; short var2 = 2; nice(var1, var2); return var2; } int nice(long s, short t) { byte x = 5 + t; t = 5 + 1 * 5 * s + t; return 2 * (t + -1) - x; }