harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

identifier.h (744B)


      1 #ifndef HARE_IDENTIFIER_H
      2 #define HARE_IDENTIFIER_H
      3 #include <stddef.h>
      4 #include <stdbool.h>
      5 #include <stdint.h>
      6 
      7 struct identifier {
      8 	char *name;
      9 	struct identifier *ns;
     10 };
     11 
     12 struct identifiers {
     13 	struct identifier ident;
     14 	struct identifiers *next;
     15 };
     16 
     17 uint32_t identifier_hash(uint32_t init, const struct identifier *ident);
     18 char *identifier_unparse(const struct identifier *ident);
     19 int identifier_unparse_static(
     20 	const struct identifier *ident, char *buf, size_t len);
     21 const char *ident_to_path(const struct identifier *ident);
     22 char *ident_to_sym(const struct identifier *ident);
     23 void identifier_dup(struct identifier *new, const struct identifier *ident);
     24 bool identifier_eq(const struct identifier *a, const struct identifier *b);
     25 
     26 #endif