diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-03-03 13:37:05 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-03-03 13:37:05 -0500 |
| commit | bf5a7253458ec5b3f4fe054b3b2f5f80211c1892 (patch) | |
| tree | e2ec63d23498c661bfda29dafa3e0311ed1140d1 /types.c | |
| parent | ec7a9e5f107a68072b3a4dd84aa6a4b461657345 (diff) | |
Definitively go with "Int" and "Num" over "Int64" and "Num64", plus add
Int__bits()
Diffstat (limited to 'types.c')
| -rw-r--r-- | types.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -17,8 +17,8 @@ CORD type_to_cord(type_t *t) { case MemoryType: return "Memory"; case BoolType: return "Bool"; case StringType: return "Str"; - case IntType: return CORD_asprintf("Int%ld", Match(t, IntType)->bits); - case NumType: return CORD_asprintf("Num%ld", Match(t, NumType)->bits); + case IntType: return Match(t, IntType)->bits == 64 ? "Int" : CORD_asprintf("Int%ld", Match(t, IntType)->bits); + case NumType: return Match(t, NumType)->bits == 64 ? "Num" : CORD_asprintf("Num%ld", Match(t, NumType)->bits); case ArrayType: { auto array = Match(t, ArrayType); return CORD_asprintf("[%r]", type_to_cord(array->item_type)); |
