absyntax/absyntax.cc
changeset 779 2ed03e0e0e41
parent 655 a77514dd0040
child 889 5f380b99e95e
equal deleted inserted replaced
778:44e02a88f1e7 779:2ed03e0e0e41
   109   elements[n++] = elem;
   109   elements[n++] = elem;
   110  
   110  
   111   if (NULL == elem) return;
   111   if (NULL == elem) return;
   112 
   112 
   113   /* adjust the location parameters, taking into account the new element. */
   113   /* adjust the location parameters, taking into account the new element. */
   114   if ((first_line == elem->first_line) &&
   114   if (NULL == first_file) {
   115       (first_column > elem->first_column)) {
   115     first_file = elem->first_file;
       
   116     first_line = elem->first_line;
       
   117     first_column = elem->first_column;
       
   118   }
       
   119   if ((first_line == elem->first_line) && (first_column > elem->first_column)) {
   116     first_column = elem->first_column;
   120     first_column = elem->first_column;
   117   }
   121   }
   118   if (first_line > elem->first_line) {
   122   if (first_line > elem->first_line) {
   119     first_line = elem->first_line;
   123     first_line = elem->first_line;
   120     first_column = elem->first_column;
   124     first_column = elem->first_column;
       
   125   }
       
   126   if (NULL == last_file) {
       
   127     last_file = elem->last_file;
       
   128     last_line = elem->last_line;
       
   129     last_column = elem->last_column;
   121   }
   130   }
   122   if ((last_line == elem->last_line) &&
   131   if ((last_line == elem->last_line) &&
   123       (last_column < elem->last_column)) {
   132       (last_column < elem->last_column)) {
   124     last_column = elem->last_column;
   133     last_column = elem->last_column;
   125   }
   134   }