1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Correct the precedences of pretty-printing for :. and :=.

This commit is contained in:
Rob Rix 2019-07-17 15:29:12 -04:00
parent 36827bb85c
commit d9ea6e783e
No known key found for this signature in database
GPG Key ID: F188A01508EA1CF7

View File

@ -94,12 +94,12 @@ prettify style = \case
Load (Const p) -> "load" `appending` p
Edge Lexical (Const n) -> "lexical" `appending` n
Edge Import (Const n) -> "import" `appending` n
Const item :. Const body -> inParens 5 $ do
Const item :. Const body -> inParens 4 $ do
f <- item
g <- body
pure (f <> symbol "." <> g)
Const lhs := Const rhs -> inParens 4 $ do
Const lhs := Const rhs -> inParens 3 $ do
f <- lhs
g <- rhs
pure (f <+> symbol "=" <+> g)