annotate samples/int64.tp @ 358:27477c8c2823

Add support for simple type annotations in parser and update llhello sample with a possible new low-level dialect syntax leveraging those annotations
author Michael Pavone <pavone@retrodev.com>
date Fri, 17 Apr 2015 17:50:47 -0700
parents f98790d8a53d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
135
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #{
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2 main <- {
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 a <- 2147483647
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 b <- 2147483647i64
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 print: "a + a = " . (string: a + a) . "\n"
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 print: "b + b = " . (string: b + b) . "\n"
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 print: "hex: a + a = " . (hex: a + a) . "\n"
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8 print: "hex: b + b = " . (hex: b + b) . "\n"
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 }
f98790d8a53d Add int64, int16 and int8. Also add hex method to integer types.
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10 }