MicroModelicaCCompiler
4.5.3
type_check.hpp
Go to the documentation of this file.
1
/*****************************************************************************
2
3
This file is part of QSS Solver.
4
5
QSS Solver is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
QSS Solver is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with QSS Solver. If not, see <http://www.gnu.org/licenses/>.
17
18
******************************************************************************/
19
20
#include <
ast/ast_types.hpp
>
21
#include "
type.hpp
"
22
#include "
util_types.hpp
"
23
24
#ifndef TYPECHECK_H_
25
#define TYPECHECK_H_
26
30
class
TypeCheck_
{
31
public
:
37
TypeCheck_
(TypeSymbolTable, VarSymbolTable);
43
Type
check_expression
(AST_Expression t);
44
45
private
:
46
TypeSymbolTable
tyEnv
;
47
VarSymbolTable
varEnv
;
48
Type
check_binop
(AST_Expression l, AST_Expression r,
BinOpType
op);
49
50
/* Mira si dos tipos son iguales (Real == Integer === true) */
51
bool
check_equal
(
Type
t1,
Type
t2);
52
};
53
54
#endif
/* TYPECHECK_H_ */
TypeCheck_::check_equal
bool check_equal(Type t1, Type t2)
Definition:
type_check.cpp:34
TypeCheck_::check_binop
Type check_binop(AST_Expression l, AST_Expression r, BinOpType op)
Definition:
type_check.cpp:51
TypeCheck_::check_expression
Type check_expression(AST_Expression t)
Definition:
type_check.cpp:88
MicroModelica::IR::EQUATION::Type
Type
Definition:
equation.hpp:50
TypeCheck_
Definition:
type_check.hpp:30
TypeCheck_::TypeCheck_
TypeCheck_(TypeSymbolTable, VarSymbolTable)
Definition:
type_check.cpp:32
util_types.hpp
type.hpp
TypeCheck_::varEnv
VarSymbolTable varEnv
Definition:
type_check.hpp:64
TypeCheck_::tyEnv
TypeSymbolTable tyEnv
Definition:
type_check.hpp:63
ast_types.hpp
BinOpType
BinOpType
Definition:
ast_types.hpp:137
util
type_check.hpp
Generated on Fri Feb 21 2025 11:43:43 for MicroModelicaCCompiler by
1.8.17