Skip to content

Commit 68fa3d2

Browse files
committed
simplifier parse polish
1 parent d153871 commit 68fa3d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/simplifiers.jl

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ vertices_on_boundary(gg::GridGraph) = vertices_on_boundary(gg.locations, gg.size
3535
function gridgraphfromstring(str::String)
3636
item_array = Vector{Bool}[]
3737
for line in split(str, "\n")
38-
if !isempty(line)
39-
push!(item_array, [item ("o", "") ? true : (@assert item (".", ""); false) for item in split(line, " ") if !isempty(item)])
38+
list = [item ("o", "") ? true : (@assert item (".", ""); false) for item in split(line, " ") if !isempty(item)]
39+
if !isempty(list)
40+
push!(item_array, list)
4041
end
4142
end
4243
@assert all(==(length(item_array[1])), length.(item_array))
@@ -70,7 +71,7 @@ end
7071
# 1. specify a gadget like the following. Use either `o` and `●` to specify a vertex,
7172
# either `.` or `⋅` to specify a placeholder.
7273
@gg DanglingLeg =
73-
"""
74+
"""
7475
⋅ ⋅ ⋅
7576
⋅ ● ⋅
7677
⋅ ● ⋅

0 commit comments

Comments
 (0)