]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/convertrules.py
convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty
[lilypond.git] / python / convertrules.py
index 5d44fd7a150c7fb33e241c247330ae754392ff4f..66ff15247638b800c005552c0e1e971e4e2fd4c5 100644 (file)
@@ -3423,6 +3423,18 @@ def conv(str):
     str = re.sub (barstring + r'"empty"', '\\1\\2"-"', str)
     return str
 
+@rule ((2, 17, 6), r"""\accidentalStyle #'Context "style" -> \accidentalStyle Context.style
+\alterBroken "Context.grob" -> \alterBroken Context.grob
+\overrideProperty "Context.grob" -> \overrideProperty Context.grob""")
+def conv (str):
+    str = re.sub (r'''(\\accidentalStyle\s+)#?"([-A-Za-z]+)"''',
+                  r"\1\2", str)
+    str = re.sub (r'''(\\accidentalStyle\s+)#'([A-Za-z]+)\s+#?"?([-A-Za-z]+)"?''',
+                  r"\1\2.\3", str)
+    str = re.sub (r'''(\\(?:alterBroken|overrideProperty)\s+)#?"([A-Za-z]+)\s*\.\s*([A-Za-z]+)"''',
+                  r"\1\2.\3", str)
+    return str
+
 # Guidelines to write rules (please keep this at the end of this file)
 #
 # - keep at most one rule per version; if several conversions should be done,