mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
parent
80cb57cb88
commit
cf136ab09f
2 changed files with 11 additions and 2 deletions
|
@ -25,9 +25,18 @@ from blueprintcompiler.language.types import ClassName
|
|||
|
||||
|
||||
class XmlEmitter:
|
||||
def __init__(self, indent=2):
|
||||
def __init__(self, indent=2, generated_notice=True):
|
||||
self.indent = indent
|
||||
self.result = '<?xml version="1.0" encoding="UTF-8"?>'
|
||||
if generated_notice:
|
||||
self.result += (
|
||||
"\n"
|
||||
"<!--\n"
|
||||
"DO NOT EDIT!\n"
|
||||
"This file was @generated by blueprint-compiler. Instead, edit the\n"
|
||||
"corresponding .blp file and regenerate this file with blueprint-compiler.\n"
|
||||
"-->"
|
||||
)
|
||||
self._tag_stack = []
|
||||
self._needs_newline = False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue