chiark / gitweb /
make-secnet-sites: pline: Break up `copyout'
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 29 Nov 2019 20:08:40 +0000 (20:08 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Feb 2020 21:56:52 +0000 (21:56 +0000)
Now we have `copyout_core' and `indent', too.

We are going to want to reuse these.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
make-secnet-sites

index ceb708f0dc143edb0198529ce9210252c7d87d5b..38badbbe830f8562bf512f44aa5cabe9938c4a3a 100755 (executable)
@@ -605,9 +605,9 @@ def pline(il,filterstate,allow_include=False):
        w=list([Tainted(x) for x in w])
        keyword=w[0]
        current=obstack[len(obstack)-1]
-       copyout=lambda: ['    '*len(obstack) +
-                       ' '.join([ww.output() for ww in w]) +
-                       '\n']
+       copyout_core=lambda: ' '.join([ww.output() for ww in w])
+       indent='    '*len(obstack)
+       copyout=lambda: [indent + copyout_core() + '\n']
        if keyword=='end-definitions':
                keyword.raw_mark_ok()
                allow_defs=sitelevel.depth