mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Add tests, remove unused code, fix bugs
- Added tests for more error messages - Test the "go to reference" feature at every character index of every test case - Delete unused code and imports - Fix some bugs I found along the way
This commit is contained in:
parent
5b0f662478
commit
9b9fab832b
47 changed files with 140 additions and 190 deletions
|
@ -366,12 +366,13 @@ class XmlOutput(OutputFormat):
|
|||
|
||||
elif isinstance(extension, ExtScaleMarks):
|
||||
xml.start_tag("marks")
|
||||
for mark in extension.children:
|
||||
for mark in extension.marks:
|
||||
label = mark.label.child if mark.label is not None else None
|
||||
xml.start_tag(
|
||||
"mark",
|
||||
value=mark.value,
|
||||
position=mark.position,
|
||||
**self._translated_string_attrs(mark.label and mark.label.child),
|
||||
**self._translated_string_attrs(label),
|
||||
)
|
||||
if mark.label is not None:
|
||||
xml.put_text(mark.label.string)
|
||||
|
|
|
@ -40,7 +40,9 @@ class XmlEmitter:
|
|||
self._tag_stack = []
|
||||
self._needs_newline = False
|
||||
|
||||
def start_tag(self, tag, **attrs: T.Union[str, GirType, ClassName, bool, None]):
|
||||
def start_tag(
|
||||
self, tag, **attrs: T.Union[str, GirType, ClassName, bool, None, float]
|
||||
):
|
||||
self._indent()
|
||||
self.result += f"<{tag}"
|
||||
for key, val in attrs.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue