Documentation ¶
Index ¶
- type BalanceChecker
- func (b *BalanceChecker) Add(r token.Type) bool
- func (b *BalanceChecker) IsBalanced() bool
- func (b *BalanceChecker) Memento() BalanceCheckerMemento
- func (b *BalanceChecker) PeekLastUnbalanced() (token.Type, bool)
- func (b *BalanceChecker) Reset()
- func (b *BalanceChecker) SetMemento(m BalanceCheckerMemento)
- type BalanceCheckerMemento
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalanceChecker ¶
type BalanceChecker struct {
// contains filtered or unexported fields
}
func NewBalanceChecker ¶
func NewBalanceChecker(pairs [][2]token.Type) BalanceChecker
func (*BalanceChecker) IsBalanced ¶
func (b *BalanceChecker) IsBalanced() bool
func (*BalanceChecker) Memento ¶
func (b *BalanceChecker) Memento() BalanceCheckerMemento
func (*BalanceChecker) PeekLastUnbalanced ¶
func (b *BalanceChecker) PeekLastUnbalanced() (token.Type, bool)
func (*BalanceChecker) Reset ¶
func (b *BalanceChecker) Reset()
func (*BalanceChecker) SetMemento ¶
func (b *BalanceChecker) SetMemento(m BalanceCheckerMemento)
type BalanceCheckerMemento ¶
type BalanceCheckerMemento struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.