summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPaul Morris <paulwmorris@gmail.com>2015-06-10 00:42:44 -0400
committerJames Lowe <pkx166h@gmail.com>2015-06-18 05:16:03 +0100
commita112b40657ce03ab64fc1d3ffbad794615cb3e3f (patch)
tree2267a71e24d75702a776a92215a49d1bd98afbea /python
parent8df18ed7b493871d72e52650022fee129789d176 (diff)
Issue 4418/3 convert-ly rule: whiteout -> whiteout-box
Diffstat (limited to 'python')
-rw-r--r--python/convertrules.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/python/convertrules.py b/python/convertrules.py
index 77d83ff52a..c1506654e0 100644
--- a/python/convertrules.py
+++ b/python/convertrules.py
@@ -3746,9 +3746,17 @@ def conv(str):
+ after_id, r'\1-\2', str)
return str
-@rule ((2, 19, 22), """(define-xxx-function (parser location ...) -> (define-xxx-function (...)
+@rule ((2, 19, 22), """whiteout -> whiteout-box
+(define-xxx-function (parser location ...) -> (define-xxx-function (...)
(xxx ... parser ...) -> (xxx ... ...)""")
def conv(str):
+ # whiteout -> whiteout-box
+ str = re.sub (r"\\whiteout(?![a-z_-])", r"\\whiteout-box", str)
+ str = re.sub (r"\b\.whiteout(?![a-z_-])\b", r".whiteout-box", str)
+ str = re.sub (r"#'whiteout(?![a-z_-])\b", r"#'whiteout-box", str)
+ str = re.sub (r"\bstencil-whiteout\b", r"stencil-whiteout-box", str)
+
+ # (define-xxx-function (parser location ...) -> (define-xxx-function (...)
def subst(m):
def subsub(m):
str = (m.group (1)
@@ -3762,6 +3770,7 @@ def conv(str):
str = re.sub (r'\(define-(?:music|event|scheme|void)-function(?=\s|["(])'
+ paren_matcher (20) + r'\)', subst, str)
+ # (xxx ... parser ...) -> (xxx ... ...)
def repl (m):
return m.group (1) + inner (m.group (2))
def inner (str):