# HG changeset patch # User Mario de Sousa # Date 1356695484 0 # Node ID 2ed03e0e0e4152dc748dd5c556121111f0a009db # Parent 44e02a88f1e77054b8da68b01866a6ad5065f3d2 Update symbol_c::first_file/last_file entries in list_c::add_element() diff -r 44e02a88f1e7 -r 2ed03e0e0e41 absyntax/absyntax.cc --- a/absyntax/absyntax.cc Thu Dec 27 15:31:01 2012 +0000 +++ b/absyntax/absyntax.cc Fri Dec 28 11:51:24 2012 +0000 @@ -111,14 +111,23 @@ if (NULL == elem) return; /* adjust the location parameters, taking into account the new element. */ - if ((first_line == elem->first_line) && - (first_column > elem->first_column)) { + if (NULL == first_file) { + first_file = elem->first_file; + first_line = elem->first_line; + first_column = elem->first_column; + } + if ((first_line == elem->first_line) && (first_column > elem->first_column)) { first_column = elem->first_column; } if (first_line > elem->first_line) { first_line = elem->first_line; first_column = elem->first_column; } + if (NULL == last_file) { + last_file = elem->last_file; + last_line = elem->last_line; + last_column = elem->last_column; + } if ((last_line == elem->last_line) && (last_column < elem->last_column)) { last_column = elem->last_column;