summaryrefslogtreecommitdiff
path: root/sexpr.h
diff options
context:
space:
mode:
authorTom Harley2020-01-11 02:53:36 +0000
committerTom Harley2020-01-11 02:53:36 +0000
commit1a3dc02a18a9050877288a5867e44d9c47a53542 (patch)
tree9e0ace97436d177ab81f79372156e3f8d6a0a451 /sexpr.h
parentAdd option to enable/disable boxing (diff)
downloadsinter-1a3dc02a18a9050877288a5867e44d9c47a53542.tar.gz
sinter-1a3dc02a18a9050877288a5867e44d9c47a53542.zip

Added int width specifiers

The width of an int can be specified at the site of its creation. For example, the following function returns an int of width 2 bits and value 1:

[def two_bit_int [] (2 1)]

Ints can still be written the old way; in these cases the compiler looks for a default int bit-width (specified with the -w flag). If a default has not been defined, the compiler throws an error.

Diffstat (limited to 'sexpr.h')
-rw-r--r--sexpr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sexpr.h b/sexpr.h
index 6719c3e..d92c070 100644
--- a/sexpr.h
+++ b/sexpr.h
@@ -17,7 +17,7 @@ typedef struct sexpr {
union contents {
double f;
char *s;
- int i;
+ unsigned i;
struct node {
struct sexpr *l;
struct sexpr *r;