mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 21:41:34 -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
|
let singleCharred p = do
|
||||||
n <- p
|
n <- p
|
||||||
value <- wrap [n]
|
value <- wrap [n]
|
||||||
|
endPosOfStartId id
|
||||||
return $ (T_DollarBraced id value)
|
return $ (T_DollarBraced id value)
|
||||||
|
|
||||||
let positional = do
|
let positional = do
|
||||||
|
@ -1575,6 +1576,7 @@ readDollarVariable = do
|
||||||
let regular = do
|
let regular = do
|
||||||
name <- readVariableName
|
name <- readVariableName
|
||||||
value <- wrap name
|
value <- wrap name
|
||||||
|
endPosOfStartId id
|
||||||
return (T_DollarBraced id value) `attempting` do
|
return (T_DollarBraced id value) `attempting` do
|
||||||
lookAhead $ char '['
|
lookAhead $ char '['
|
||||||
parseNoteAt pos ErrorC 1087 "Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet)."
|
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