Skip to content

Commit

Permalink
GUI: Enable 'extract' simplification when argument is complex (not ju…
Browse files Browse the repository at this point in the history
…st an id).
  • Loading branch information
jim-carciofini committed Jan 21, 2025
1 parent 333c5d4 commit 8e7d4d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pate_binja/pate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ def simplify_sexp(sexp, env=None):

# ('_', 'extract', s, e)(n) => n<s,e>
if (isinstance(op, list) and len(op) == 4 and op[0] == '_' and op[1] == 'extract'
and len(arg) == 1 and isinstance(arg[0], str)):
and len(arg) == 1):
return f'{arg[0]}<{op[2]}:{op[3]}>'

# Simplify call(F, args...) => F(args...)
Expand Down

0 comments on commit 8e7d4d7

Please sign in to comment.