mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-14 02:27:30 -07:00
Parse empty [ ] conditionals
This commit is contained in:
parent
7604e5eb58
commit
5c01b6c7f5
3 changed files with 17 additions and 2 deletions
|
@ -48,6 +48,7 @@ data Token =
|
|||
| TC_Nullary Id ConditionType Token
|
||||
| TC_Or Id ConditionType String Token Token
|
||||
| TC_Unary Id ConditionType String Token
|
||||
| TC_Empty Id ConditionType
|
||||
| T_AND_IF Id
|
||||
| T_AndIf Id Token Token
|
||||
| T_Arithmetic Id Token
|
||||
|
@ -372,6 +373,7 @@ getId t = case t of
|
|||
T_CoProcBody id _ -> id
|
||||
T_Include id _ _ -> id
|
||||
T_UnparsedIndex id _ _ -> id
|
||||
TC_Empty id _ -> id
|
||||
|
||||
blank :: Monad m => Token -> m ()
|
||||
blank = const $ return ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue