#include "pitch.hh"
/**
- State for the parser. Do not ever add any variables to parse
- musical content here. We still have to remove default_duration_.
+ State for the parser.
TODO: interface is too complicated
*/
Lily_lexer *lexer_;
Sources *sources_;
Duration default_duration_;
+ int default_tremolo_type_;
string output_basename_;
SCM closures_;
lexer_ = 0;
sources_ = sources;
default_duration_ = Duration (2, 0);
+ default_tremolo_type_ = 8;
error_level_ = 0;
closures_ = SCM_EOL;
lexer_ = 0;
sources_ = src.sources_;
default_duration_ = src.default_duration_;
+ default_tremolo_type_ = src.default_tremolo_type_;
error_level_ = 0;
output_basename_ = src.output_basename_;
closures_ = closures;
tremolo_type:
':' {
- $$ = SCM_INUM0;
+ $$ = scm_from_int (parser->default_tremolo_type_);
}
| ':' UNSIGNED {
- if (SCM_UNBNDP (make_duration ($2)))
+ if (SCM_UNBNDP (make_duration ($2))) {
parser->parser_error (@2, _ ("not a duration"));
- $$ = $2;
+ $$ = scm_from_int (parser->default_tremolo_type_);
+ } else {
+ $$ = $2;
+ parser->default_tremolo_type_ = scm_to_int ($2);
+ }
}
;