Documentation ¶
Index ¶
- type Token
- type TokenQueue
- func (q *TokenQueue) Any() bool
- func (q *TokenQueue) Clear()
- func (q *TokenQueue) Drop(n int)
- func (q *TokenQueue) FlushTo(dst *TokenQueue)
- func (q *TokenQueue) Len() int
- func (q *TokenQueue) Pop() *Token
- func (q *TokenQueue) PopTo(dst *TokenQueue)
- func (q *TokenQueue) Push(tokens ...*Token)
- func (q *TokenQueue) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenQueue ¶
type TokenQueue struct {
Tokens []*Token
}
TokenQueue is a FIFO queue
func (*TokenQueue) Any ¶
func (q *TokenQueue) Any() bool
Any returns whether there are any tokens in the queue
func (*TokenQueue) Drop ¶
func (q *TokenQueue) Drop(n int)
Drop removes n elements from the front of the queue
func (*TokenQueue) FlushTo ¶
func (q *TokenQueue) FlushTo(dst *TokenQueue)
FlushTo moves all tokens from one queue to another
func (*TokenQueue) Pop ¶
func (q *TokenQueue) Pop() *Token
Pop returns the first token (front of) the queue, and removes it from the queue
func (*TokenQueue) PopTo ¶
func (q *TokenQueue) PopTo(dst *TokenQueue)
PopTo moves a token from one queue to another
func (*TokenQueue) Push ¶
func (q *TokenQueue) Push(tokens ...*Token)
Push appends a token to the end of the queue
func (*TokenQueue) String ¶
func (q *TokenQueue) String() string
Click to show internal directories.
Click to hide internal directories.