@@ -114,21 +114,42 @@ class languaget:public messaget
114
114
115
115
// conversion of expressions
116
116
117
+ // / Formats the given expression in a language-specific way
118
+ // / \param expr: the expression to format
119
+ // / \param code: the formatted expression
120
+ // / \param ns: a namespace
121
+ // / \return false if conversion succeeds
117
122
virtual bool from_expr (
118
123
const exprt &expr,
119
124
std::string &code,
120
125
const namespacet &ns);
121
126
127
+ // / Formats the given type in a language-specific way
128
+ // / \param type: the type to format
129
+ // / \param code: the formatted type
130
+ // / \param ns: a namespace
131
+ // / \return false if conversion succeeds
122
132
virtual bool from_type (
123
133
const typet &type,
124
134
std::string &code,
125
135
const namespacet &ns);
126
136
137
+ // / Encodes the given type in a language-specific way
138
+ // / \param type: the type to encode
139
+ // / \param name: the encoded type
140
+ // / \param ns: a namespace
141
+ // / \return false if the conversion succeeds
127
142
virtual bool type_to_name (
128
143
const typet &type,
129
144
std::string &name,
130
145
const namespacet &ns);
131
146
147
+ // / Parses the given string into an expression
148
+ // / \param code: the string to parse
149
+ // / \param module: prefix to be used for identifiers
150
+ // / \param expr: the parsed expression
151
+ // / \param ns: a namespace
152
+ // / \return false if the conversion succeeds
132
153
virtual bool to_expr (
133
154
const std::string &code,
134
155
const std::string &module,
0 commit comments