mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 22:35:54 +08:00
Add end pos to readDollarVariable
This commit is contained in:
@@ -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)."
|
||||
|
Reference in New Issue
Block a user