]> git.donarmstrong.com Git - lilypond.git/commitdiff
(open_request_parens): add input locations to
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 18 Jun 2002 14:36:05 +0000 (14:36 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 18 Jun 2002 14:36:05 +0000 (14:36 +0000)
open and close parens.

ChangeLog
lily/include/duration.hh
lily/musical-request.cc
lily/parser.yy

index ab0f437ee58fb8c92b2d0250ff2caa9a32742de9..dce7808ecbda4f4808ad313fea31685e0564ab97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-18  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+       * lily/parser.yy (open_request_parens): add input locations to
+       open and close parens. 
+
 2002-06-17  Chris Jackson <chris@fluffhouse.org.uk>
 
        * lily/tuplet-bracket.cc:
index c256f74d85ea986c7913b1957aa96331dceee057..49fe93e24390104e6f00d90bb9f472cce63650eb 100644 (file)
    A musical duration.
   */
 struct Duration {
+public:
+  
   Duration ();
   Duration (int, int);
   String str () const;
-  void set_plet (int,int );
+
   Duration compressed (Rational) const;
   Rational length_mom () const ;
+
+
+  int duration_log ()const;
+  int dot_count () const;
+
   static int compare (Duration const&, Duration const&);
 
   SCM smobbed_copy () const;
   DECLARE_SCHEME_CALLBACK (less_p, (SCM a, SCM b));
   DECLARE_SIMPLE_SMOBS (Duration,);
-
-public:
-  int duration_log ()const;
-  int dot_count () const;
   
 private:
     /// Logarithm of the base duration.
index 147fce3fa2cbce1143d66df4cda8d34a3a8bc1ae..28aee7f944b917a45f9a7ebe21b922c1c0acf26d 100644 (file)
@@ -35,11 +35,13 @@ Moment
 Rhythmic_req::length_mom () const
 {
   Duration *d = unsmob_duration (get_mus_property ("duration"));
-  if (!d){
-    Moment m ;
-    programming_error("Rhythmic_req has no duration");
-    return m;
-  }
+  if (!d)
+    {
+      Moment m ;
+      programming_error("Rhythmic_req has no duration");
+      return m;
+    }
+  
   return d->length_mom ();
 }
 
index 05d570ab5be69be99fb1b539f38fba864ae47006..5a27a77dfe107c8f609014355e115b6b3f0e1dde 100644 (file)
@@ -1535,21 +1535,25 @@ close_request_parens:
                Span_req* s= new Span_req;
                $$ = s;
                s->set_mus_property ("span-type", ly_str02scm ( "slur"));
+               s->set_spot (THIS->here_input());
        }
        | E_OPEN        {
                Span_req* s= new Span_req;
                $$ = s;
                s->set_mus_property ("span-type", ly_str02scm ( "phrasing-slur"));
+               s->set_spot (THIS->here_input());
        }
        | E_SMALLER {
                Span_req*s =new Span_req;
                $$ = s;
                s->set_mus_property ("span-type", ly_str02scm ( "crescendo"));
+               s->set_spot (THIS->here_input());
        }
        | E_BIGGER {
                Span_req*s =new Span_req;
                $$ = s;
                s->set_mus_property ("span-type", ly_str02scm ("decrescendo"));
+               s->set_spot (THIS->here_input());
        }
        ;
 
@@ -1565,6 +1569,7 @@ open_request_parens:
        E_EXCLAMATION   {
                Span_req *s =  new Span_req;
                s->set_mus_property ("span-type", ly_str02scm ( "crescendo"));
+               s->set_spot (THIS->here_input());
 
                $$ = s;
        }
@@ -1572,11 +1577,14 @@ open_request_parens:
                Span_req* s= new Span_req;
                $$ = s;
                s->set_mus_property ("span-type", ly_str02scm ( "slur"));
+               s->set_spot (THIS->here_input());
+
        }
        | E_CLOSE       {
                Span_req* s= new Span_req;
                $$ = s;
                s->set_mus_property ("span-type", ly_str02scm ( "phrasing-slur"));
+               s->set_spot (THIS->here_input());
        }
        ;