summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-01-05 00:27:44 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-01-05 00:27:44 -0500
commit0fff6ef4013795e90322343f30fc144e7e422d9b (patch)
tree48cced164f021d92a263b5e46103aa90c99b4ec9 /types.h
parent6cd1d263377dedb49510b65fd983552bc1b40cb3 (diff)
exporting identifiers
Diffstat (limited to 'types.h')
-rw-r--r--types.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/types.h b/types.h
index e608950..82b1c08 100644
--- a/types.h
+++ b/types.h
@@ -185,7 +185,8 @@ typedef struct IdentTree {
/* zero value is an empty trie */
uint16_t depth;
unsigned char index_in_parent; /* index of this in .parent.children */
- U64 id; /* 0 if there's no actual identifier here, otherwise unique positive integer associated with this identifier */
+ bool export_name; /* is this identifier's name important? */
+ U64 export_id; /* 0 if there's no exported identifier here, otherwise unique positive integer associated with this identifier */
struct IdentTree *parent;
struct IdentTree *children[TREE_NCHILDREN];
IdentDecl *decls; /* array of declarations of this identifier */
@@ -757,8 +758,10 @@ typedef struct Typer {
typedef struct Exporter {
FILE *out; /* .top (toc package) to output to */
bool export_locations;
+ U64 ident_id;
FnExpr **exported_fns;
StructDef **exported_structs;
+ Identifier *exported_idents; /* (only those whose names are exported) */
} Exporter;
typedef struct CGenerator {