(tok *Token)
| 429 | } |
| 430 | |
| 431 | func tokenIsNewline(tok *Token) bool { |
| 432 | switch tok.Type { |
| 433 | case hclsyntax.TokenNewline: |
| 434 | return true |
| 435 | case hclsyntax.TokenComment: |
| 436 | // Single line tokens (# and //) consume their terminating newline, |
| 437 | // so we need to treat them as newline tokens as well. |
| 438 | if len(tok.Bytes) > 0 && tok.Bytes[len(tok.Bytes)-1] == '\n' { |
| 439 | return true |
| 440 | } |
| 441 | } |
| 442 | return false |
| 443 | } |
| 444 | |
| 445 | func tokenBracketChange(tok *Token) int { |
| 446 | switch tok.Type { |