mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 13:31:36 -07:00
Add end pos to readDollarVariable
This commit is contained in:
parent
0c459ae2cb
commit
3848788c2d
1 changed files with 2 additions and 0 deletions
|
@ -1562,6 +1562,7 @@ readDollarVariable = do
|
|||
let singleCharred p = do
|
||||
n <- p
|
||||
value <- wrap [n]
|
||||
endPosOfStartId id
|
||||
return $ (T_DollarBraced id value)
|
||||
|
||||
let positional = do
|
||||
|
@ -1575,6 +1576,7 @@ readDollarVariable = do
|
|||
let regular = do
|
||||
name <- readVariableName
|
||||
value <- wrap name
|
||||
endPosOfStartId id
|
||||
return (T_DollarBraced id value) `attempting` do
|
||||
lookAhead $ char '['
|
||||
parseNoteAt pos ErrorC 1087 "Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet)."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue