@@ -94,7 +94,7 @@ def build_clause(clause: list[Directive | str], current: Node, condition: Condit
9494 # TODO: Actually handle justification
9595 build_clause (sum (directive .clauses , []), current , Condition (), closing , escape )
9696
97- cfg .add_edge (current , current := escape , condition = Condition ())
97+ cfg .add_edge (closing , current := escape , condition = Condition ())
9898 condition = Condition ()
9999
100100 case '^' :
@@ -183,5 +183,15 @@ def draw_cfg(cfg: nx.DiGraph, *, size: int = 12):
183183 plt .show ()
184184
185185
186- CFG = program_to_cfg ("""~{~a~^~?~}~a""" )
187- draw_cfg (CFG , size = 12 )
186+ CFG = program_to_cfg ("""~:[█ ~%~;~]~:*~
187+ ~{~<~#,#,101^~?~>█~@{~#,#,3^~
188+ ~<~v,' ^~<~v,' ^~<~v,' ^ ~>~:*~>~:*~>~:*~
189+ ~<~v,' ^~<~v,' ^~<~v,'█^█~>~:*~>~:*~>~:*~
190+ ~<~v,' ^~<~v,'█^~<~v,' ^█~>~:*~>~:*~>~:*~
191+ ~<~v,' ^~<~v,'█^~<~v,'█^█~>~:*~>~:*~>~:*~
192+ ~<~v,'█^~<~v,' ^~<~v,' ^█~>~:*~>~:*~>~:*~
193+ ~<~v,'█^~<~v,' ^~<~v,'█^█~>~:*~>~:*~>~:*~
194+ ~<~v,'█^~<~v,'█^~<~v,' ^ ~>~:*~>~:*~>~:*~
195+ ~<~v,'█^~<~v,'█^~<~v,'█^ ~>~:*~>~:*~>~
196+ ~}█ ~%~0^~}""" )
197+ draw_cfg (CFG , size = 48 )
0 commit comments