{-# language DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
module Language.Python.Syntax.AugAssign where
import Control.Lens.Lens (lens)
import Language.Python.Syntax.Whitespace
data AugAssign a
= MkAugAssign
{ _augAssignType :: AugAssignOp
, _augAssignAnn :: a
, _augAssignWhitespace :: [Whitespace]
}
deriving (Eq, Show, Functor, Foldable, Traversable)
instance HasTrailingWhitespace (AugAssign a) where
trailingWhitespace =
lens _augAssignWhitespace (\a b -> a { _augAssignWhitespace = b })
data AugAssignOp
= PlusEq
| MinusEq
| StarEq
| AtEq
| SlashEq
| PercentEq
| AmpersandEq
| PipeEq
| CaretEq
| ShiftLeftEq
| ShiftRightEq
| DoubleStarEq
| DoubleSlashEq
deriving (Eq, Show)