diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-05 15:33:08 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-05 15:33:08 -0500 |
| commit | a8a35ea688b07a6cd3e342ad75e045b7433d294b (patch) | |
| tree | 385a6f7de6fedd54b0e0678d778e6908f67aed19 /environment.c | |
| parent | b238f1df41eb4f3badd69abc9ae0b5dc857e58a6 (diff) | |
Add Byte.hex()
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/environment.c b/environment.c index 6ae96291..b7b33f04 100644 --- a/environment.c +++ b/environment.c @@ -101,6 +101,7 @@ env_t *new_compilation_unit(CORD libname) )}, {"Byte", Type(ByteType), "Byte_t", "Byte$info", TypedArray(ns_entry_t, {"max", "Byte$max", "Byte"}, + {"hex", "Byte$hex", "func(byte:Byte, uppercase=yes, prefix=no -> Text)"}, {"min", "Byte$min", "Byte"}, )}, {"Int", Type(BigIntType), "Int_t", "Int$info", TypedArray(ns_entry_t, @@ -643,7 +644,7 @@ binding_t *get_namespace_binding(env_t *env, ast_t *self, const char *name) case ArrayType: return NULL; case TableType: return NULL; case CStringType: case DateTimeType: - case BoolType: case IntType: case BigIntType: case NumType: { + case BoolType: case IntType: case BigIntType: case NumType: case ByteType: { binding_t *b = get_binding(env, CORD_to_const_char_star(type_to_cord(cls_type))); assert(b); return get_binding(Match(b->type, TypeInfoType)->env, name); |
