struct f_val *val; /* For SYM_CONSTANT */
uint offset; /* For SYM_VARIABLE */
const struct keyword *keyword; /* For SYM_KEYWORD */
+ const struct f_method *method; /* For SYM_METHOD */
};
char name[0];
byte readonly:1; /* Do not add new symbols */
};
-enum keyword_scope {
- CFK_KEYWORDS,
- CFK_METHODS,
- CFK__MAX
-};
-
extern struct sym_scope *global_root_scope;
+extern pool *global_root_scope_pool;
+extern linpool *global_root_scope_linpool;
struct bytestring {
size_t length;
#define SYM_TABLE 5
#define SYM_ATTRIBUTE 6
#define SYM_KEYWORD 7
+#define SYM_METHOD 8
#define SYM_VARIABLE 0x100 /* 0x100-0x1ff are variable types */
#define SYM_VARIABLE_RANGE SYM_VARIABLE ... (SYM_VARIABLE | 0xff)
static inline int cf_symbol_is_local(struct config *conf, struct symbol *sym)
{ return (sym->scope == conf->current_scope) && !conf->current_scope->soft_scopes; }
+/* internal */
+struct symbol *cf_new_symbol(struct sym_scope *scope, pool *p, struct linpool *lp, const byte *c);
+
/**
* cf_define_symbol - define meaning of a symbol
* @sym: symbol to be defined