Insert inserts a new token at given position
(i int, tok token.Token, str ...string)
| 55 | |
| 56 | // Insert inserts a new token at given position |
| 57 | func (tk *Tokens) Insert(i int, tok token.Token, str ...string) *Token { |
| 58 | nt := NewToken(tok, str...) |
| 59 | *tk = slices.Insert(*tk, i, nt) |
| 60 | return nt |
| 61 | } |
| 62 | |
| 63 | // Last returns the final token in the list |
| 64 | func (tk Tokens) Last() *Token { |
no test coverage detected