sema_init() now returns void
This commit is contained in:
parent
849e0b6863
commit
f7689a3f54
4 changed files with 6 additions and 7 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,4 +1,6 @@
|
|||
**/*.o
|
||||
**/*~
|
||||
lc
|
||||
*.swp
|
||||
**/*.swp
|
||||
**/*.pdf
|
||||
**/*.dot
|
||||
|
|
|
|||
3
lc.c
3
lc.c
|
|
@ -231,8 +231,7 @@ int main(void)
|
|||
lexer *l = lexer_init(src, size, &a);
|
||||
parser *p = parser_init(l, &a);
|
||||
//print_ast(p->ast, 0);
|
||||
sema *s = sema_init(p, &a);
|
||||
//(void) s;
|
||||
sema_init(p, &a);
|
||||
|
||||
ir_build(p->ast);
|
||||
|
||||
|
|
|
|||
4
sema.c
4
sema.c
|
|
@ -778,7 +778,7 @@ static void analyze_unit(sema *s, ast_node *node)
|
|||
}
|
||||
}
|
||||
|
||||
sema *sema_init(parser *p, arena *a)
|
||||
void sema_init(parser *p, arena *a)
|
||||
{
|
||||
sema *s = arena_alloc(a, sizeof(sema));
|
||||
s->allocator = a;
|
||||
|
|
@ -814,6 +814,4 @@ sema *sema_init(parser *p, arena *a)
|
|||
const_float->data.flt = 0;
|
||||
|
||||
analyze_unit(s, s->ast);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
|
|||
2
sema.h
2
sema.h
|
|
@ -71,6 +71,6 @@ typedef struct {
|
|||
ast_node *ast;
|
||||
} sema;
|
||||
|
||||
sema *sema_init(parser *p, arena *a);
|
||||
void sema_init(parser *p, arena *a);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue