aboutsummaryrefslogtreecommitdiff
path: root/src/primitives.gperf
diff options
context:
space:
mode:
Diffstat (limited to 'src/primitives.gperf')
-rw-r--r--src/primitives.gperf42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/primitives.gperf b/src/primitives.gperf
deleted file mode 100644
index bc2cb2e..0000000
--- a/src/primitives.gperf
+++ /dev/null
@@ -1,42 +0,0 @@
-%compare-strncmp
-%includes
-%language=ANSI-C
-%readonly-tables
-%struct-type
-
-%{
-#include <stdbool.h>
-
-#include "analyzer.h"
-#include "types.h"
-
-#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
-#pragma GCC diagnostic ignored "-Wunused-parameter"
-%}
-
-struct typeslot { char *name; struct type inner; };
-%%
-i8, { TYPE_NUM, {.size = 1, .issigned=true, .isfloat=false} }
-i16, { TYPE_NUM, {.size = 2, .issigned=true, .isfloat=false} }
-i32, { TYPE_NUM, {.size = 4, .issigned=true, .isfloat=false} }
-i64, { TYPE_NUM, {.size = 8, .issigned=true, .isfloat=false} }
-i128, { TYPE_NUM, {.size = 16, .issigned=true, .isfloat=false} }
-int, { TYPE_NUM, {.size = 8, .issigned=true, .isfloat=false} }
-u8, { TYPE_NUM, {.size = 1, .issigned=false, .isfloat=false} }
-u16, { TYPE_NUM, {.size = 2, .issigned=false, .isfloat=false} }
-u32, { TYPE_NUM, {.size = 4, .issigned=false, .isfloat=false} }
-u64, { TYPE_NUM, {.size = 8, .issigned=false, .isfloat=false} }
-u128, { TYPE_NUM, {.size = 16, .issigned=false, .isfloat=false} }
-uint, { TYPE_NUM, {.size = 8, .issigned=false, .isfloat=false} }
-rune, { TYPE_NUM, {.size = 4, .issigned=true, .isfloat=false} }
-f16, { TYPE_NUM, {.size = 2, .issigned=true, .isfloat=true } }
-f32, { TYPE_NUM, {.size = 4, .issigned=true, .isfloat=true } }
-f64, { TYPE_NUM, {.size = 8, .issigned=true, .isfloat=true } }
-f128, { TYPE_NUM, {.size = 16, .issigned=true, .isfloat=true } }
-%%
-const struct type *
-typelookup(const uchar *p, size_t len)
-{
- const struct typeslot *tp = in_word_set(p, len);
- return tp == NULL ? NULL : &tp->inner;
-}