2 input.cc -- implement Input
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
12 #include "source-file.hh"
14 Input::Input(Source_file*s, char const *cl)
26 Input::Input(Input const &s)
28 source_file_l_ = s.source_file_l_;
29 defined_ch_C_ = s.defined_ch_C_;
33 Input::set_spot(Input const &i)
39 Input::message(String message_str)const
43 if ( source_file_l_ ) {
44 str += source_file_l_->file_line_no_str(defined_ch_C_) + String(": ");
48 if ( source_file_l_ ) {
50 str += source_file_l_->error_str( defined_ch_C_);
56 Input::warning( String message_str)const
58 message( "warning: " + message_str);
61 Input::error(String s)const
63 message("error: "+ s);
67 Input::location_str()const
70 return source_file_l_->file_line_no_str(defined_ch_C_);
72 return "(location unknown)";