5f09dcbe1321 — Gerald Klix (MGEHPE0) 3 years ago
SUM: Added an explicit string argument to push.
1 files changed, 7 insertions(+), 0 deletions(-)

M gf/go.py
M gf/go.py +7 -0
@@ 304,6 304,13 @@ def push(writer: IndentingWriter, steps:
     writer.indent += indent
     if writer.only_newline:
         writer.file.write(indent)
+        
+@method()
+def push(writer: IndentingWriter, indent: str):
+    writer.indents.append(writer.indent)
+    writer.indent += indent
+    if writer.only_newline:
+        writer.file.write(indent)
 
 @method()
 def push(writer: IndentingWriter):