\version "2.11.8"
+%% todo : use macro, to show the statement tested.
#(ly:progress "~a" (ly:expand-environment "${HOME} $HOME $$ "))
+#(ly:font-config-display-fonts)
+#(ly:progress "~A" (ly:duration->string (ly:make-duration 2 2 3 7)))
+
+
+#(ly:parser-parse-string (ly:parser-clone parser) "foo = #1 #(ly:progress \"hello there\n\")")
--- /dev/null
+
+\header {
+ texidoc = "test identifiers."
+ }
+\version "2.10.8"
+
+num = #3
+mus = { c'4 }
+paperId = \paper { line-width = 5.0 \cm }
+layoutId = \layout { ragged-right = ##t }
+perfId = \midi {}
+markupId = \markup { hoi }
+stringId = "title"
+
+% headers not allowed as Id's
+
+scoreId = \score {
+ \repeat unfold \num \mus
+ \layout { \layoutId }
+ \midi { \perfId }
+ }
+
+bookId = \book {
+ \score { \scoreId }
+ \paper { \paperId }
+ }
+
+
+\book { \bookId }
+
+
--- /dev/null
+\version "2.10.8"
+\header {
+ texidoc = "The pitch wheel is used for microtones."
+ }
+
+\score {
+ { c4 cih cis cisih d }
+ \midi { }
+ }
+
--- /dev/null
+\version "2.10.0"
+\header{
+
+ texidoc="For longer measure lengths, the breve rest is used."
+
+}
+
+\layout {
+ \context {
+ \Score
+ skipBars = ##t
+ }
+ ragged-right = ##t
+}
+
+
+{
+ \time 8/4
+ R1*12
+ \time 4/4
+ R1*6
+}
+
+
\time 3/4 \key cis \major
R2.*15
- R2.
- R2.*3
+ R2.*7
R2.*9
R2.*11
return Moment (unsmob_duration (dur)->get_length ()).smobbed_copy ();
}
+LY_DEFINE (ly_duration2string, "ly:duration->string",
+ 1, 0, 0, (SCM dur),
+ "Convert{dur} to string.")
+{
+ SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
+ return ly_string2scm (unsmob_duration (dur)->to_string ());
+}
+
LY_DEFINE (ly_duration_factor, "ly:duration-factor",
1, 0, 0, (SCM dur),
"Extract the compression factor from @var{dur}. Return as a pair.")
return SCM_UNSPECIFIED;
}
-LY_DEFINE (ly_parse_string, "ly:parse-string",
- 1, 0, 0, (SCM ly_code),
- "Parse the string LY_CODE. "
- "Upon failure, throw @code{ly-file-failed} key.")
-{
- SCM_ASSERT_TYPE (scm_is_string (ly_code), ly_code, SCM_ARG1, __FUNCTION__, "string");
-
- Sources sources;
- sources.set_path (&global_path);
- Lily_parser *parser = new Lily_parser (&sources);
- parser->parse_string (ly_scm2string (ly_code));
- parser->unprotect ();
- parser = 0;
-
- return SCM_UNSPECIFIED;
-}
LY_DEFINE (ly_parser_lexer, "ly:parser-lexer",
1, 0, 0, (SCM parser_smob),
int count = 0;
Real symbols_width = 0.0;
- SCM sml = me->get_property ("use-breve-rest");
+ bool use_breve = to_boolean (me->get_property ("use-breve-rest"));
while (l)
{
- if (sml == SCM_BOOL_T)
+ if (use_breve)
{
int k;
if (l >= 2)
lilypond_header_body:
{
- $$ = get_header(PARSER);
+ $$ = get_header (PARSER);
PARSER->lexer_->add_scope ($$);
}
| lilypond_header_body assignment {