diff options
author | Linus Torvalds <torvalds@home.transmeta.com> | 2003-03-20 10:54:14 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 20:59:31 -0700 |
commit | 0474cdb18bbe72035ca493487776dbb5a8b325b5 (patch) | |
tree | 7fe9d5badef603bb00f56a97ce2d031b16824284 /symbol.c | |
parent | 15f971e49f7bf7b8b9576a15bf2b3982f4a59ac8 (diff) | |
download | sparse-0474cdb18bbe72035ca493487776dbb5a8b325b5.tar.gz |
Add symbol scoping for proper parsing.
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -7,6 +7,7 @@ #include "token.h" #include "parse.h" #include "symbol.h" +#include "scope.h" struct symbol *lookup_symbol(struct ident *ident, enum namespace ns) { @@ -146,6 +147,8 @@ void bind_symbol(struct symbol *sym, struct ident *ident, enum namespace ns) sym->namespace = ns; sym->next_id = ident->symbols; ident->symbols = sym; + sym->id_list = &ident->symbols; + bind_scope(sym); } struct symbol *create_symbol(int stream, const char *name, int type) |