Skip to content

Commit bcec958

Browse files
committed
Link JSON symbol tables
Instead of trying to merge them and throwing exception for every symbol conflict.
1 parent 9d2ca43 commit bcec958

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/json-symtab-language/json_symtab_language.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Author: Chris Smowton, [email protected]
1313
#include <json/json_parser.h>
1414
#include <util/namespace.h>
1515

16+
#include <linking/linking.h>
17+
1618
/// Parse a goto program in json form.
1719
/// \param instream: The input stream
1820
/// \param path: A file path
@@ -34,10 +36,12 @@ bool json_symtab_languaget::typecheck(
3436
{
3537
(void)module; // unused parameter
3638

39+
symbol_tablet new_symbol_table;
40+
3741
try
3842
{
39-
symbol_table_from_json(parsed_json_file, symbol_table);
40-
return false;
43+
symbol_table_from_json(parsed_json_file, new_symbol_table);
44+
return linking(symbol_table, new_symbol_table, get_message_handler());
4145
}
4246
catch(const std::string &str)
4347
{
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
goto-programs
22
json
33
langapi
4+
linking
45
util

0 commit comments

Comments
 (0)