CBMC
Loading...
Searching...
No Matches
Functions
json_symbol.cpp File Reference
#include "json_symbol.h"
#include <util/exception_utils.h>
#include <util/expr.h>
#include <util/json_irep.h>
#include <util/type.h>
+ Include dependency graph for json_symbol.cpp:

Go to the source code of this file.

Functions

const std::string &  try_get_string (const jsont &in, const std::string &key)
  Return string value for a given key if present in the json object.
 
bool  try_get_bool (const jsont &in, const std::string &key)
  Return boolean value for a given key if present in the json object.
 
  Return a source_locationt from the given JSON object.
 
  Deserialise a json object to a symbolt.
 

Function Documentation

◆  symbol_from_json()

symbolt symbol_from_json ( const jsontin )

Deserialise a json object to a symbolt.

Parameters
in The json object that is getting fetched as an object.
Returns
A symbolt representing the json object.

Definition at line 140 of file json_symbol.cpp.

◆  try_get_bool()

bool try_get_bool ( const jsontin,
const std::string &  key 
)

Return boolean value for a given key if present in the json object.

Parameters
in The json object that is getting fetched as a boolean.
key The key for the json value to be fetched.
Returns
A boolean value for the corresponding key.

Definition at line 25 of file json_symbol.cpp.

◆  try_get_source_location()

source_locationt try_get_source_location ( const jsontjson )

Return a source_locationt from the given JSON object.

Parameters
json The json object that represents a source location.
Returns
A source location, unless an exception was thrown before.

Definition at line 34 of file json_symbol.cpp.

◆  try_get_string()

const std::string & try_get_string ( const jsontin,
const std::string &  key 
)

Return string value for a given key if present in the json object.

Parameters
in The json object that is getting fetched as a string.
key The key for the json value to be fetched.
Returns
A string value for the corresponding key.

Definition at line 16 of file json_symbol.cpp.

AltStyle によって変換されたページ (->オリジナル) /