1
1
mirror of https://github.com/google/ormolu.git synced 2024-12-02 23:43:34 +03:00

Implement ‘VarBr’

This commit is contained in:
mrkkrp 2019-07-07 13:37:15 +02:00 committed by Mark Karpov
parent cad7e40ae5
commit d82d607b3a
3 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,3 @@
foo = ''R
bar = 'foo

View File

@ -0,0 +1,3 @@
foo = ''R
bar = 'foo

View File

@ -13,6 +13,7 @@ where
import Bag (bagToList)
import BasicTypes
import Control.Monad
import Data.Bool (bool)
import Data.Data hiding (Infix, Prefix)
import Data.List (intersperse, sortOn)
import Data.Text (Text)
@ -728,7 +729,9 @@ p_hsBracket = \case
DecBrL NoExt decls -> quote "d" (p_hsDecls Free decls)
DecBrG NoExt _ -> notImplemented "DecBrG" -- result of renamer
TypBr NoExt ty -> quote "t" (located ty p_hsType)
VarBr NoExt _ _ -> notImplemented "VarBr"
VarBr NoExt isSingleQuote name -> do
txt (bool "''" "'" isSingleQuote)
p_rdrName (noLoc name)
TExpBr NoExt expr -> do
txt "[||"
breakpoint'