mapper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mapper

type Mapper interface {
	Map() Tokens
	Items() map[string][]int
	AddIndex(v string, index int) Mapping
}

type Mapping

type Mapping map[string][]int

func NewMappingFromTokens

func NewMappingFromTokens(tokens []string) Mapping

func (Mapping) AddIndex

func (m Mapping) AddIndex(v string, index int) Mapping

func (Mapping) Items

func (m Mapping) Items() map[string][]int

func (Mapping) Map

func (m Mapping) Map() Tokens

type Tokens

type Tokens struct {
	Values map[int][]rune
	Ids    []int
}

func (Tokens) GetRunesByID

func (t Tokens) GetRunesByID(id int) []rune

Jump to

Keyboard shortcuts

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