balancecheck

package
v0.0.0-...-70fd0a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

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) Add

func (b *BalanceChecker) Add(r token.Type) bool

func (*BalanceChecker) IsBalanced

func (b *BalanceChecker) IsBalanced() bool

func (*BalanceChecker) Memento

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL