-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsemantic_t.h
32 lines (23 loc) · 940 Bytes
/
semantic_t.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef SEMANTIC_T_H
#define SEMANTIC_T_H
#include "compiler.h"
#include "semantic.h"
#include "ast.h"
#include "type.h"
#include "adt/obst.h"
#include "symbol.h"
#include "lexer.h"
typedef statement_t* (*lower_statement_function) (statement_t *statement);
typedef expression_t* (*lower_expression_function) (expression_t *expression);
void print_error_prefix(const source_position_t position);
void print_warning_prefix(const source_position_t position);
void error_at(const source_position_t position, const char *message);
void register_statement_lowerer(lower_statement_function function,
unsigned int statement_type);
void register_expression_lowerer(lower_expression_function function,
unsigned int expression_type);
WARN_UNUSED
statement_t* check_statement(statement_t *statement);
WARN_UNUSED
expression_t* check_expression(expression_t *expression);
#endif