runes

package
v0.0.0-...-4349ab3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CursorEOF = rune(0)

Variables

This section is empty.

Functions

func Equal

func Equal(a, b []rune) bool

func IsDigit

func IsDigit(r rune) bool

func IsNumericHead

func IsNumericHead(r rune) bool

func IsUnaryOp

func IsUnaryOp(r rune) bool

func IsWord

func IsWord(r rune) bool

func IsWordHead

func IsWordHead(r rune) bool

Types

type Cursor

type Cursor struct {
	Text     *[]rune
	Len      int
	Position *Position
	// contains filtered or unexported fields
}

func NewCursor

func NewCursor(text *[]rune) *Cursor

func (*Cursor) Clone

func (c *Cursor) Clone() *Cursor

func (*Cursor) Current

func (c *Cursor) Current() rune

func (*Cursor) Next

func (c *Cursor) Next() rune

func (*Cursor) Seek

func (c *Cursor) Seek(n int) rune

type Position

type Position struct {
	Line  int
	Col   int
	Index int
}

func NewPosition

func NewPosition() *Position

func (*Position) Clone

func (p *Position) Clone() *Position

func (*Position) String

func (p *Position) String() string

Jump to

Keyboard shortcuts

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