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
45 str
+= location_str() + String(": ");
52 str
+= source_file_l_
->error_str(defined_ch_C_
);
58 Input::warning(String message_str
) const
60 message("warning: " + message_str
);
63 Input::error(String s
) const
65 message("error: "+ s
);
69 Input::location_str() const
72 return source_file_l_
->file_line_no_str(defined_ch_C_
);
74 return "(location unknown)";