@@ -165,36 +165,59 @@ static void show_symbol_table_json_ui(
165
165
if (symbol.value .is_not_nil ())
166
166
ptr->from_expr (symbol.value , value_str, ns);
167
167
168
+ json_stringt pretty_name_json{symbol.pretty_name };
169
+ json_stringt name_json{symbol.name };
170
+ json_stringt base_name_json{symbol.base_name };
171
+ json_stringt mode_json{symbol.mode };
172
+ json_stringt module_json{symbol.module };
173
+ json_stringt pretty_type_json{type_str};
174
+ json_stringt pretty_value_json{value_str};
175
+ jsont type_json{irep_converter.convert_from_irep (symbol.type )};
176
+ jsont value_json{irep_converter.convert_from_irep (symbol.value )};
177
+ jsont location_json{irep_converter.convert_from_irep (symbol.location )};
178
+ jsont is_type_json{jsont::json_boolean (symbol.is_type )};
179
+ jsont is_macro_json{jsont::json_boolean (symbol.is_macro )};
180
+ jsont is_exported_json{jsont::json_boolean (symbol.is_exported )};
181
+ jsont is_input_json{jsont::json_boolean (symbol.is_input )};
182
+ jsont is_output_json{jsont::json_boolean (symbol.is_output )};
183
+ jsont is_state_var_json{jsont::json_boolean (symbol.is_state_var )};
184
+ jsont is_property_json{jsont::json_boolean (symbol.is_property )};
185
+ jsont is_static_lifetime_json{jsont::json_boolean (symbol.is_static_lifetime )};
186
+ jsont is_thread_local_json{jsont::json_boolean (symbol.is_thread_local )};
187
+ jsont is_lvalue_json{jsont::json_boolean (symbol.is_lvalue )};
188
+ jsont is_file_local_json{jsont::json_boolean (symbol.is_file_local )};
189
+ jsont is_extern_json{jsont::json_boolean (symbol.is_extern )};
190
+ jsont is_volatile_json{jsont::json_boolean (symbol.is_volatile )};
191
+ jsont is_parameter_json{jsont::json_boolean (symbol.is_parameter )};
192
+ jsont is_auxiliary_json{jsont::json_boolean (symbol.is_auxiliary )};
193
+ jsont is_weak_json{jsont::json_boolean (symbol.is_weak )};
168
194
json_objectt symbol_json{
169
- {" prettyName" , json_stringt (symbol.pretty_name )},
170
- {" name" , json_stringt (symbol.name )},
171
- {" baseName" , json_stringt (symbol.base_name )},
172
- {" mode" , json_stringt (symbol.mode )},
173
- {" module" , json_stringt (symbol.module )},
174
-
175
- {" prettyType" , json_stringt (type_str)},
176
- {" prettyValue" , json_stringt (value_str)},
177
-
178
- {" type" , irep_converter.convert_from_irep (symbol.type )},
179
- {" value" , irep_converter.convert_from_irep (symbol.value )},
180
- {" location" , irep_converter.convert_from_irep (symbol.location )},
181
-
182
- {" isType" , jsont::json_boolean (symbol.is_type )},
183
- {" isMacro" , jsont::json_boolean (symbol.is_macro )},
184
- {" isExported" , jsont::json_boolean (symbol.is_exported )},
185
- {" isInput" , jsont::json_boolean (symbol.is_input )},
186
- {" isOutput" , jsont::json_boolean (symbol.is_output )},
187
- {" isStateVar" , jsont::json_boolean (symbol.is_state_var )},
188
- {" isProperty" , jsont::json_boolean (symbol.is_property )},
189
- {" isStaticLifetime" , jsont::json_boolean (symbol.is_static_lifetime )},
190
- {" isThreadLocal" , jsont::json_boolean (symbol.is_thread_local )},
191
- {" isLvalue" , jsont::json_boolean (symbol.is_lvalue )},
192
- {" isFileLocal" , jsont::json_boolean (symbol.is_file_local )},
193
- {" isExtern" , jsont::json_boolean (symbol.is_extern )},
194
- {" isVolatile" , jsont::json_boolean (symbol.is_volatile )},
195
- {" isParameter" , jsont::json_boolean (symbol.is_parameter )},
196
- {" isAuxiliary" , jsont::json_boolean (symbol.is_auxiliary )},
197
- {" isWeak" , jsont::json_boolean (symbol.is_weak )}};
195
+ {{" prettyName" , std::move (pretty_name_json)},
196
+ {" name" , std::move (name_json)},
197
+ {" baseName" , std::move (base_name_json)},
198
+ {" mode" , std::move (mode_json)},
199
+ {" module" , std::move (module_json)},
200
+ {" prettyType" , std::move (pretty_type_json)},
201
+ {" prettyValue" , std::move (pretty_value_json)},
202
+ {" type" , std::move (type_json)},
203
+ {" value" , std::move (value_json)},
204
+ {" location" , std::move (location_json)},
205
+ {" isType" , std::move (is_type_json)},
206
+ {" isMacro" , std::move (is_macro_json)},
207
+ {" isExported" , std::move (is_exported_json)},
208
+ {" isInput" , std::move (is_input_json)},
209
+ {" isOutput" , std::move (is_output_json)},
210
+ {" isStateVar" , std::move (is_state_var_json)},
211
+ {" isProperty" , std::move (is_property_json)},
212
+ {" isStaticLifetime" , std::move (is_static_lifetime_json)},
213
+ {" isThreadLocal" , std::move (is_thread_local_json)},
214
+ {" isLvalue" , std::move (is_lvalue_json)},
215
+ {" isFileLocal" , std::move (is_file_local_json)},
216
+ {" isExtern" , std::move (is_extern_json)},
217
+ {" isVolatile" , std::move (is_volatile_json)},
218
+ {" isParameter" , std::move (is_parameter_json)},
219
+ {" isAuxiliary" , std::move (is_auxiliary_json)},
220
+ {" isWeak" , std::move (is_weak_json)}}};
198
221
199
222
result.push_back (id2string (symbol.name ), std::move (symbol_json));
200
223
}
@@ -224,15 +247,19 @@ static void show_symbol_table_brief_json_ui(
224
247
if (symbol.type .is_not_nil ())
225
248
ptr->from_type (symbol.type , type_str, ns);
226
249
250
+ json_stringt pretty_name_json{symbol.pretty_name };
251
+ json_stringt base_name_json{symbol.base_name };
252
+ json_stringt mode_json{symbol.mode };
253
+ json_stringt module_json{symbol.module };
254
+ json_stringt pretty_type_json{type_str};
255
+ jsont type_json{irep_converter.convert_from_irep (symbol.type )};
227
256
json_objectt symbol_json{
228
- {" prettyName" , json_stringt (symbol.pretty_name )},
229
- {" baseName" , json_stringt (symbol.base_name )},
230
- {" mode" , json_stringt (symbol.mode )},
231
- {" module" , json_stringt (symbol.module )},
232
-
233
- {" prettyType" , json_stringt (type_str)},
234
-
235
- {" type" , irep_converter.convert_from_irep (symbol.type )}};
257
+ {{" prettyName" , std::move (pretty_name_json)},
258
+ {" baseName" , std::move (base_name_json)},
259
+ {" mode" , std::move (mode_json)},
260
+ {" module" , std::move (module_json)},
261
+ {" prettyType" , std::move (pretty_type_json)},
262
+ {" type" , std::move (type_json)}}};
236
263
237
264
result.push_back (id2string (symbol.name ), std::move (symbol_json));
238
265
}
0 commit comments