Skip to content

Commit

Permalink
More informative "Unrecognised element" warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ZimM-LostPolygon committed Oct 2, 2023
1 parent bc3e2b4 commit 845a04a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/code_dom/externc.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def parse(context, stream):
if not child_element.no_default_add:
dom_element.add_child(child_element, context)
else:
print("Unrecognised element: " + str(vars(tok)))
print("Unrecognised element: " + str(vars(tok)) + " in DOMExternC")
break

if not has_braces:
Expand Down
2 changes: 1 addition & 1 deletion src/code_dom/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def parse(context, stream):
if not child_element.no_default_add:
dom_element.add_child(child_element, context)
else:
print("Unrecognised element: " + str(vars(tok)))
print("Unrecognised element: " + str(vars(tok)) + " in DOMNamespace " + dom_element.name)
break

return dom_element
Expand Down
2 changes: 1 addition & 1 deletion src/code_dom/preprocessorif.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def parse(context, stream):
else:
dom_element.add_child(child_element, context)
else:
print("Unrecognised element " + str(stream.peek_token()))
print("Unrecognised element: " + str(stream.peek_token()) + " in DOMPreprocessorIf")
break

return dom_element
Expand Down

0 comments on commit 845a04a

Please sign in to comment.