class ABC::Actions { method note_length($/) { if $<note_length_denominator> { make duration-from-parse($<top>[0], $<note_length_denominator>[0]<bottom>[0]); } else { make duration-from-parse($<top>[0]); } } method note($/) { make ABC::Note.new(~$<pitch>, $<note_length>.ast, $<tie> eq '-'); } }