ShellCheck-0.10.0: Shell script analysis tool
Safe HaskellSafe-Inferred
LanguageHaskell98

ShellCheck.AST

Documentation

newtype Id Source #

Constructors

Id Int 

Instances

Instances details
Generic Id Source # 
Instance details

Defined in ShellCheck.AST

Associated Types

type Rep Id :: Type -> Type #

Methods

from :: Id -> Rep Id x #

to :: Rep Id x -> Id #

Show Id Source # 
Instance details

Defined in ShellCheck.AST

Methods

showsPrec :: Int -> Id -> ShowS #

show :: Id -> String #

showList :: [Id] -> ShowS #

NFData Id Source # 
Instance details

Defined in ShellCheck.AST

Methods

rnf :: Id -> () #

Eq Id Source # 
Instance details

Defined in ShellCheck.AST

Methods

(==) :: Id -> Id -> Bool #

(/=) :: Id -> Id -> Bool #

Ord Id Source # 
Instance details

Defined in ShellCheck.AST

Methods

compare :: Id -> Id -> Ordering #

(<) :: Id -> Id -> Bool #

(<=) :: Id -> Id -> Bool #

(>) :: Id -> Id -> Bool #

(>=) :: Id -> Id -> Bool #

max :: Id -> Id -> Id #

min :: Id -> Id -> Id #

type Rep Id Source # 
Instance details

Defined in ShellCheck.AST

type Rep Id = D1 ('MetaData "Id" "ShellCheck.AST" "ShellCheck-0.10.0-2PbLDXkACVu1ZGX6gq2jIm" 'True) (C1 ('MetaCons "Id" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data Quoted Source #

Constructors

Quoted 
Unquoted 

Instances

Instances details
Show Quoted Source # 
Instance details

Defined in ShellCheck.AST

Eq Quoted Source # 
Instance details

Defined in ShellCheck.AST

Methods

(==) :: Quoted -> Quoted -> Bool #

(/=) :: Quoted -> Quoted -> Bool #

data Dashed Source #

Constructors

Dashed 
Undashed 

Instances

Instances details
Show Dashed Source # 
Instance details

Defined in ShellCheck.AST

Eq Dashed Source # 
Instance details

Defined in ShellCheck.AST

Methods

(==) :: Dashed -> Dashed -> Bool #

(/=) :: Dashed -> Dashed -> Bool #

data AssignmentMode Source #

Constructors

Assign 
Append 

Instances

Instances details
Show AssignmentMode Source # 
Instance details

Defined in ShellCheck.AST

Eq AssignmentMode Source # 
Instance details

Defined in ShellCheck.AST

newtype FunctionKeyword Source #

Constructors

FunctionKeyword Bool 

Instances

Instances details
Show FunctionKeyword Source # 
Instance details

Defined in ShellCheck.AST

Eq FunctionKeyword Source # 
Instance details

Defined in ShellCheck.AST

data CaseType Source #

Instances

Instances details
Show CaseType Source # 
Instance details

Defined in ShellCheck.AST

Eq CaseType Source # 
Instance details

Defined in ShellCheck.AST

newtype Root Source #

Constructors

Root Token 

data Token Source #

Constructors

OuterToken Id (InnerToken Token) 

Instances

Instances details
Show Token Source # 
Instance details

Defined in ShellCheck.AST

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #

Eq Token Source # 
Instance details

Defined in ShellCheck.AST

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

data InnerToken t Source #

Constructors

Inner_TA_Binary String t t 
Inner_TA_Assignment String t t 
Inner_TA_Variable String [t] 
Inner_TA_Expansion [t] 
Inner_TA_Sequence [t] 
Inner_TA_Parenthesis t 
Inner_TA_Trinary t t t 
Inner_TA_Unary String t 
Inner_TC_And ConditionType String t t 
Inner_TC_Binary ConditionType String t t 
Inner_TC_Group ConditionType t 
Inner_TC_Nullary ConditionType t 
Inner_TC_Or ConditionType String t t 
Inner_TC_Unary ConditionType String t 
Inner_TC_Empty ConditionType 
Inner_T_AND_IF 
Inner_T_AndIf t t 
Inner_T_Arithmetic t 
Inner_T_Array [t] 
Inner_T_IndexedElement [t] t 
Inner_T_UnparsedIndex SourcePos String 
Inner_T_Assignment AssignmentMode String [t] t 
Inner_T_Backgrounded t 
Inner_T_Backticked [t] 
Inner_T_Bang 
Inner_T_Banged t 
Inner_T_BraceExpansion [t] 
Inner_T_BraceGroup [t] 
Inner_T_CLOBBER 
Inner_T_Case 
Inner_T_CaseExpression t [(CaseType, [t], [t])] 
Inner_T_Condition ConditionType t 
Inner_T_DGREAT 
Inner_T_DLESS 
Inner_T_DLESSDASH 
Inner_T_DSEMI 
Inner_T_Do 
Inner_T_DollarArithmetic t 
Inner_T_DollarBraced Bool t 
Inner_T_DollarBracket t 
Inner_T_DollarDoubleQuoted [t] 
Inner_T_DollarExpansion [t] 
Inner_T_DollarSingleQuoted String 
Inner_T_DollarBraceCommandExpansion [t] 
Inner_T_Done 
Inner_T_DoubleQuoted [t] 
Inner_T_EOF 
Inner_T_Elif 
Inner_T_Else 
Inner_T_Esac 
Inner_T_Extglob String [t] 
Inner_T_FdRedirect String t 
Inner_T_Fi 
Inner_T_For 
Inner_T_ForArithmetic t t t [t] 
Inner_T_ForIn String [t] [t] 
Inner_T_Function FunctionKeyword FunctionParentheses String t 
Inner_T_GREATAND 
Inner_T_Glob String 
Inner_T_Greater 
Inner_T_HereDoc Dashed Quoted String [t] 
Inner_T_HereString t 
Inner_T_If 
Inner_T_IfExpression [([t], [t])] [t] 
Inner_T_In 
Inner_T_IoFile t t 
Inner_T_IoDuplicate t String 
Inner_T_LESSAND 
Inner_T_LESSGREAT 
Inner_T_Lbrace 
Inner_T_Less 
Inner_T_Literal String 
Inner_T_Lparen 
Inner_T_NEWLINE 
Inner_T_NormalWord [t] 
Inner_T_OR_IF 
Inner_T_OrIf t t 
Inner_T_ParamSubSpecialChar String 
Inner_T_Pipeline [t] [t] 
Inner_T_ProcSub String [t] 
Inner_T_Rbrace 
Inner_T_Redirecting [t] t 
Inner_T_Rparen 
Inner_T_Script t [t] 
Inner_T_Select 
Inner_T_SelectIn String [t] [t] 
Inner_T_Semi 
Inner_T_SimpleCommand [t] [t] 
Inner_T_SingleQuoted String 
Inner_T_Subshell [t] 
Inner_T_Then 
Inner_T_Until 
Inner_T_UntilExpression [t] [t] 
Inner_T_While 
Inner_T_WhileExpression [t] [t] 
Inner_T_Annotation [Annotation] t 
Inner_T_Pipe String 
Inner_T_CoProc (Maybe String) t 
Inner_T_CoProcBody t 
Inner_T_Include t 
Inner_T_SourceCommand t t 
Inner_T_BatsTest String t 

Instances

Instances details
Foldable InnerToken Source # 
Instance details

Defined in ShellCheck.AST

Methods

fold :: Monoid m => InnerToken m -> m #

foldMap :: Monoid m => (a -> m) -> InnerToken a -> m #

foldMap' :: Monoid m => (a -> m) -> InnerToken a -> m #

foldr :: (a -> b -> b) -> b -> InnerToken a -> b #

foldr' :: (a -> b -> b) -> b -> InnerToken a -> b #

foldl :: (b -> a -> b) -> b -> InnerToken a -> b #

foldl' :: (b -> a -> b) -> b -> InnerToken a -> b #

foldr1 :: (a -> a -> a) -> InnerToken a -> a #

foldl1 :: (a -> a -> a) -> InnerToken a -> a #

toList :: InnerToken a -> [a] #

null :: InnerToken a -> Bool #

length :: InnerToken a -> Int #

elem :: Eq a => a -> InnerToken a -> Bool #

maximum :: Ord a => InnerToken a -> a #

minimum :: Ord a => InnerToken a -> a #

sum :: Num a => InnerToken a -> a #

product :: Num a => InnerToken a -> a #

Traversable InnerToken Source # 
Instance details

Defined in ShellCheck.AST

Methods

traverse :: Applicative f => (a -> f b) -> InnerToken a -> f (InnerToken b) #

sequenceA :: Applicative f => InnerToken (f a) -> f (InnerToken a) #

mapM :: Monad m => (a -> m b) -> InnerToken a -> m (InnerToken b) #

sequence :: Monad m => InnerToken (m a) -> m (InnerToken a) #

Functor InnerToken Source # 
Instance details

Defined in ShellCheck.AST

Methods

fmap :: (a -> b) -> InnerToken a -> InnerToken b #

(<$) :: a -> InnerToken b -> InnerToken a #

Show t => Show (InnerToken t) Source # 
Instance details

Defined in ShellCheck.AST

Eq t => Eq (InnerToken t) Source # 
Instance details

Defined in ShellCheck.AST

Methods

(==) :: InnerToken t -> InnerToken t -> Bool #

(/=) :: InnerToken t -> InnerToken t -> Bool #

data ConditionType Source #

Instances

Instances details
Show ConditionType Source # 
Instance details

Defined in ShellCheck.AST

Eq ConditionType Source # 
Instance details

Defined in ShellCheck.AST

pattern T_AND_IF :: Id -> Token Source #

pattern T_Bang :: Id -> Token Source #

pattern T_Case :: Id -> Token Source #

pattern T_CLOBBER :: Id -> Token Source #

pattern T_DGREAT :: Id -> Token Source #

pattern T_DLESS :: Id -> Token Source #

pattern T_DLESSDASH :: Id -> Token Source #

pattern T_Do :: Id -> Token Source #

pattern T_Done :: Id -> Token Source #

pattern T_DSEMI :: Id -> Token Source #

pattern T_Elif :: Id -> Token Source #

pattern T_Else :: Id -> Token Source #

pattern T_EOF :: Id -> Token Source #

pattern T_Esac :: Id -> Token Source #

pattern T_Fi :: Id -> Token Source #

pattern T_For :: Id -> Token Source #

pattern T_Glob :: Id -> String -> Token Source #

pattern T_GREATAND :: Id -> Token Source #

pattern T_Greater :: Id -> Token Source #

pattern T_If :: Id -> Token Source #

pattern T_In :: Id -> Token Source #

pattern T_Lbrace :: Id -> Token Source #

pattern T_Less :: Id -> Token Source #

pattern T_LESSAND :: Id -> Token Source #

pattern T_LESSGREAT :: Id -> Token Source #

pattern T_Literal :: Id -> String -> Token Source #

pattern T_Lparen :: Id -> Token Source #

pattern T_NEWLINE :: Id -> Token Source #

pattern T_OR_IF :: Id -> Token Source #

pattern T_Pipe :: Id -> String -> Token Source #

pattern T_Rbrace :: Id -> Token Source #

pattern T_Rparen :: Id -> Token Source #

pattern T_Select :: Id -> Token Source #

pattern T_Semi :: Id -> Token Source #

pattern T_Then :: Id -> Token Source #

pattern T_Until :: Id -> Token Source #

pattern T_While :: Id -> Token Source #

pattern TA_Assignment :: Id -> String -> Token -> Token -> Token Source #

pattern TA_Binary :: Id -> String -> Token -> Token -> Token Source #

pattern TA_Expansion :: Id -> [Token] -> Token Source #

pattern T_AndIf :: Id -> Token -> Token -> Token Source #

pattern T_Annotation :: Id -> [Annotation] -> Token -> Token Source #

pattern T_Arithmetic :: Id -> Token -> Token Source #

pattern T_Array :: Id -> [Token] -> Token Source #

pattern TA_Sequence :: Id -> [Token] -> Token Source #

pattern TA_Parentesis :: Id -> Token -> Token Source #

pattern TA_Trinary :: Id -> Token -> Token -> Token -> Token Source #

pattern TA_Unary :: Id -> String -> Token -> Token Source #

pattern TA_Variable :: Id -> String -> [Token] -> Token Source #

pattern T_Backgrounded :: Id -> Token -> Token Source #

pattern T_Backticked :: Id -> [Token] -> Token Source #

pattern T_Banged :: Id -> Token -> Token Source #

pattern T_BatsTest :: Id -> String -> Token -> Token Source #

pattern T_BraceExpansion :: Id -> [Token] -> Token Source #

pattern T_BraceGroup :: Id -> [Token] -> Token Source #

pattern TC_And :: Id -> ConditionType -> String -> Token -> Token -> Token Source #

pattern T_CaseExpression :: Id -> Token -> [(CaseType, [Token], [Token])] -> Token Source #

pattern T_CoProcBody :: Id -> Token -> Token Source #

pattern T_CoProc :: Id -> Maybe String -> Token -> Token Source #

pattern TC_Or :: Id -> ConditionType -> String -> Token -> Token -> Token Source #

pattern T_DollarBraced :: Id -> Bool -> Token -> Token Source #

pattern T_DollarExpansion :: Id -> [Token] -> Token Source #

pattern T_DoubleQuoted :: Id -> [Token] -> Token Source #

pattern T_Extglob :: Id -> String -> [Token] -> Token Source #

pattern T_FdRedirect :: Id -> String -> Token -> Token Source #

pattern T_ForArithmetic :: Id -> Token -> Token -> Token -> [Token] -> Token Source #

pattern T_ForIn :: Id -> String -> [Token] -> [Token] -> Token Source #

pattern T_HereDoc :: Id -> Dashed -> Quoted -> String -> [Token] -> Token Source #

pattern T_HereString :: Id -> Token -> Token Source #

pattern T_IfExpression :: Id -> [([Token], [Token])] -> [Token] -> Token Source #

pattern T_Include :: Id -> Token -> Token Source #

pattern T_IndexedElement :: Id -> [Token] -> Token -> Token Source #

pattern T_IoDuplicate :: Id -> Token -> String -> Token Source #

pattern T_IoFile :: Id -> Token -> Token -> Token Source #

pattern T_NormalWord :: Id -> [Token] -> Token Source #

pattern T_OrIf :: Id -> Token -> Token -> Token Source #

pattern T_Pipeline :: Id -> [Token] -> [Token] -> Token Source #

pattern T_ProcSub :: Id -> String -> [Token] -> Token Source #

pattern T_Redirecting :: Id -> [Token] -> Token -> Token Source #

pattern T_Script :: Id -> Token -> [Token] -> Token Source #

pattern T_SelectIn :: Id -> String -> [Token] -> [Token] -> Token Source #

pattern T_SimpleCommand :: Id -> [Token] -> [Token] -> Token Source #

pattern T_SourceCommand :: Id -> Token -> Token -> Token Source #

pattern T_Subshell :: Id -> [Token] -> Token Source #

pattern T_UntilExpression :: Id -> [Token] -> [Token] -> Token Source #

pattern T_WhileExpression :: Id -> [Token] -> [Token] -> Token Source #

analyze :: Monad m => (Token -> m ()) -> (Token -> m ()) -> (Token -> m Token) -> Token -> m Token Source #

blank :: Monad m => Token -> m () Source #

doAnalysis :: Monad m => (Token -> m ()) -> Token -> m Token Source #

doStackAnalysis :: Monad m => (Token -> m ()) -> (Token -> m ()) -> Token -> m Token Source #