- Chord chord = to_chord (tonic, add_arr_p, sub_arr_p, inversion_p, bass_p);
-
- Tonic_req* t = new Tonic_req;
- t->pitch_ = tonic;
- v->add_music (t);
-
- //urg
- if (inversion_p
- && Chord::find_notename_i (&chord.pitch_arr_, *inversion_p) > 0)
- {
- Inversion_req* i = new Inversion_req;
- i->pitch_ = *inversion_p;
- v->add_music (i);
- }
-
- if (bass_p)
- {
- Bass_req* b = new Bass_req;
- b->pitch_ = *bass_p;
- v->add_music (b);
- }
-
- Array<Musical_pitch> pitch_arr = chord.to_pitch_arr ();
- for (int i = 0; i < pitch_arr.size (); i++)
- {
- Musical_pitch p = pitch_arr[i];
- Note_req* n = new Note_req;
- n->pitch_ = p;
- n->duration_ = d;
- v->add_music (n);
- }
-
- return v;
+ /*
+ Actually, that gets very icky when there are white space, because
+ the line-numbers are all wrong. Let's try the character before
+ the current token. That gets the right result for
+ note/duration stuff, but doesn't mess up for errors in the 1st token of the line.
+
+ */
+ Input hi (lexer_->here_input ());
+
+ char const * bla = hi.defined_str0_;
+ if (hi.line_number () > 1
+ || hi.column_number () > 1)
+ bla --;
+
+ return Input (hi.source_file_, bla);