Skip to content

Commit ef4e9e5

Browse files
committed
AST: fix fileformats in pir inspector
1 parent 5637aa8 commit ef4e9e5

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

chb/app/CHVersion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
chbversion: str = "0.3.0-20250819"
1+
chbversion: str = "0.3.0-20250821"

chb/ast/ASTViewer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ def visit_block_stmt(self, stmt: AST.ASTBlock) -> None:
158158
self.add_edge(name, self.label_name(label))
159159
label.accept(self)
160160
for s in stmt.stmts:
161-
self.add_edge(name, self.stmt_name(s))
161+
if s.is_stmt_label:
162+
print("DEBUG: stmt-label in list of stmts at location: " + str(s.locationid))
163+
else:
164+
self.add_edge(name, self.stmt_name(s))
162165
s.accept(self)
163166

164167
def visit_loop_stmt(self, stmt: AST.ASTLoop) -> None:

chb/ast/pirinspector

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def parse() -> argparse.Namespace:
8989
"--fileformat",
9090
help="desired format for output file (default is pdf)",
9191
choices=["pdf", "png"],
92-
default=["pdf"]
92+
default="pdf"
9393
)
9494
viewastcmd.add_argument(
9595
"-o",
@@ -114,7 +114,7 @@ def parse() -> argparse.Namespace:
114114
"--fileformat",
115115
help="desired format for output file (default is pdf)",
116116
choices=["pdf", "png"],
117-
default=["pdf"]
117+
default="pdf"
118118
)
119119
viewstmtcmd.add_argument(
120120
"-o", "--output",
@@ -139,7 +139,7 @@ def parse() -> argparse.Namespace:
139139
"--fileformat",
140140
help="desired format for output file (default is pdf)",
141141
choices=["pdf", "png"],
142-
default=["pdf"]
142+
default="pdf"
143143
)
144144
viewinstrcmd.add_argument(
145145
"-o",

0 commit comments

Comments
 (0)