bpo-44345: Fix 'generated by' comment in parser.c (GH-26615)

This commit is contained in:
Akira Nonaka 2021-06-09 23:38:53 +09:00 committed by GitHub
parent 5571cabf1b
commit aef1b58dc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
// @generated by pegen.py from ./Grammar/python.gram // @generated by pegen from ./Grammar/python.gram
#include "pegen.h" #include "pegen.h"
#if defined(Py_DEBUG) && defined(Py_BUILD_CORE) #if defined(Py_DEBUG) && defined(Py_BUILD_CORE)

View File

@ -405,7 +405,7 @@ class CParserGenerator(ParserGenerator, GrammarVisitor):
def generate(self, filename: str) -> None: def generate(self, filename: str) -> None:
self.collect_todo() self.collect_todo()
self.print(f"// @generated by pegen.py from {filename}") self.print(f"// @generated by pegen from {filename}")
header = self.grammar.metas.get("header", EXTENSION_PREFIX) header = self.grammar.metas.get("header", EXTENSION_PREFIX)
if header: if header:
self.print(header.rstrip("\n")) self.print(header.rstrip("\n"))