forked from GitHub/gf-rgl
in Formal.usePrec, removed variant parenthOpt for a better control of parentheses ; use Formal.parenth explicitly if you want to parse superfluous parentheses
This commit is contained in:
@@ -29,7 +29,7 @@ resource Formal = open Prelude in {
|
|||||||
usePrec : Prec -> TermPrec -> Str = \p,x ->
|
usePrec : Prec -> TermPrec -> Str = \p,x ->
|
||||||
case lessPrec x.p p of {
|
case lessPrec x.p p of {
|
||||||
True => parenth x.s ;
|
True => parenth x.s ;
|
||||||
False => parenthOpt x.s
|
False => x.s --- parenthOpt x.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
parenth : Str -> Str = \s -> "(" ++ s ++ ")" ;
|
parenth : Str -> Str = \s -> "(" ++ s ++ ")" ;
|
||||||
|
|||||||
Reference in New Issue
Block a user