look up operator precedence when arity does not match what the atom records, don't print brackets around outermost '+' (#629)
This commit is contained in:
@@ -157,9 +157,12 @@ needs_bracketing(Value, Op) :-
|
||||
current_op(FPrec, _, F)),
|
||||
_,
|
||||
false),
|
||||
( EqPrec < FPrec -> true
|
||||
; '$quoted_token'(F) -> true
|
||||
; atom_length(F, 1), graphic_token_char(F) -> true
|
||||
( EqPrec < FPrec ->
|
||||
true
|
||||
; '$quoted_token'(F) ->
|
||||
true
|
||||
; FPrec > 0, F == Value, graphic_token_char(F) ->
|
||||
true
|
||||
; EqPrec == FPrec,
|
||||
memberchk(EqSpec, [fx,xfx,yfx])
|
||||
).
|
||||
|
||||
Reference in New Issue
Block a user