17 #ifndef ZORBA_INTERNAL_DIAGNOSTIC_H
18 #define ZORBA_INTERNAL_DIAGNOSTIC_H
30 namespace diagnostic {
34 namespace serialization {
40 namespace diagnostic {
68 location() : line_( 0 ), column_( 0 ), line_end_( 0 ), column_end_( 0 ) {
87 file_( file ), line_( line ), column_( column ),
88 line_end_( line_end ), column_end_( column_end )
105 template<
class StringType>
108 file_( file.
c_str() ), line_( line ), column_( column ),
109 line_end_( line_end ), column_end_( column_end )
119 return file_.c_str();
164 return explicit_bool::value_of( line_ );
192 line_end_ = line_end;
193 column_end_ = column_end;
201 column_type column_end_;
218 bool operator==( location
const &i, location
const &j );
228 bool operator!=( location
const &i, location
const &j );
237 typedef std::vector<std::string> params_type;
273 return params_[ i - 1 ];
327 void substitute( value_type *s )
const;
332 void add_param( value_type
const& );
333 value_type lookup_param( size_type i )
const;
334 bool then_else(
bool, value_type
const&, value_type::size_type*,
336 size_type to_index( value_type::value_type )
const;