-
Notifications
You must be signed in to change notification settings - Fork 273
/
Copy pathlanguage.cpp
59 lines (47 loc) · 1.07 KB
/
language.cpp
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*******************************************************************\
Module: Abstract interface to support a programming language
Author: Daniel Kroening, [email protected]
\*******************************************************************/
/// \file
/// Abstract interface to support a programming language
#include "language.h"
#include <util/expr.h>
bool languaget::final(symbol_table_baset &)
{
return false;
}
bool languaget::interfaces(symbol_table_baset &, message_handlert &)
{
return false;
}
void languaget::dependencies(
const std::string &,
std::set<std::string> &)
{
}
bool languaget::from_expr(
const exprt &expr,
std::string &code,
const namespacet &)
{
code=expr.pretty();
return false;
}
bool languaget::from_type(
const typet &type,
std::string &code,
const namespacet &)
{
code=type.pretty();
return false;
}
bool languaget::type_to_name(
const typet &type,
std::string &name,
const namespacet &)
{
// probably ansi-c/type2name could be used as better fallback if moved to
// util/
name=type.pretty();
return false;
}