Skip to content

Instantly share code, notes, and snippets.

@hyunjimoon
Created October 1, 2022 13:04
Show Gist options
  • Save hyunjimoon/875d33ac3f609ad3aaa75372291c60ca to your computer and use it in GitHub Desktop.
Save hyunjimoon/875d33ac3f609ad3aaa75372291c60ca to your computer and use it in GitHub Desktop.
pysd ast print
for section in am.sections:
for element in section.elements:
print("*" * 10)
print(f"name: {element.name}")
print(f"length: {len(element.components)}")
for component in element.components:
print(f"type: {component.type}")
print(f"subtype: {component.subtype}")
print(f"subscript: {component.subscripts}")
print(component.ast)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment