hcl/hclsyntax: Fix token range reporting for invalid characters
This commit is contained in:
parent
45accbc687
commit
4f47ee198a
@ -189,6 +189,9 @@ func checkInvalidTokens(tokens Tokens) hcl.Diagnostics {
|
||||
toldBadUTF8 := 0
|
||||
|
||||
for _, tok := range tokens {
|
||||
// copy token so it's safe to point to it
|
||||
tok := tok
|
||||
|
||||
switch tok.Type {
|
||||
case TokenBitwiseAnd, TokenBitwiseOr, TokenBitwiseXor, TokenBitwiseNot:
|
||||
if toldBitwise < 4 {
|
||||
|
Loading…
Reference in New Issue
Block a user