From b7e5486baa8ff43fbd9a8892600b225480a6c364 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 29 Sep 2024 16:56:50 -0400 Subject: [PATCH] Internals: Fix astgen spacing --- src/astgen | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/astgen b/src/astgen index 8a4dbdb3c..2f1355e10 100755 --- a/src/astgen +++ b/src/astgen @@ -913,7 +913,7 @@ def write_ast_impl(filename): with open_file(filename) as fh: def emitBlock(pattern, **fmt): - fh.write(textwrap.indent(textwrap.dedent(pattern), " ").format(**fmt)) + fh.write(pattern.format(**fmt)) for node in AstNodeList: if node.name == "Node": @@ -931,7 +931,8 @@ def write_ast_impl(filename): " BROKEN_RTN(!m_{name}->brokeExists());\n", name=ptr['name']) # Node's broken rules can be specialized by declaring broken() - emitBlock(" return Ast{t}::broken(); }}\n", t=node.name) + emitBlock(" return Ast{t}::broken();\n", t=node.name) + emitBlock("}}\n", t=node.name) emitBlock("void Ast{t}::cloneRelinkGen() {{\n", t=node.name) if node.superClass.name != 'Node':