diff options
Diffstat (limited to 'conf/conf.h')
-rw-r--r-- | conf/conf.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/conf/conf.h b/conf/conf.h index b7c97ce5..1413cb58 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -126,6 +126,7 @@ struct symbol { 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]; @@ -144,13 +145,9 @@ struct sym_scope { 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; @@ -168,6 +165,7 @@ struct bytestring { #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) @@ -215,6 +213,9 @@ struct symbol *cf_localize_symbol(struct config *conf, struct symbol *sym); 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 |