source_file

package
v0.0.0-...-9aa4175 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package source_file contains the SourceFile type. This should ideally be in the common package but that would cause an import cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SourceFile

type SourceFile struct {
	// contains filtered or unexported fields
}

func NewSourceFile

func NewSourceFile(name string, tb tui.TextBuffer, words []Word) SourceFile

func (*SourceFile) Name

func (self *SourceFile) Name() string

func (*SourceFile) NextWord

func (self *SourceFile) NextWord() Optional[Word]

func (*SourceFile) Ok

func (self *SourceFile) Ok() bool

func (*SourceFile) PeekWord

func (self *SourceFile) PeekWord() Optional[Word]

func (*SourceFile) String

func (self *SourceFile) String() string

func (*SourceFile) Text

func (self *SourceFile) Text() *tui.TextBuffer

func (*SourceFile) Words

func (self *SourceFile) Words() []Word

type Word

type Word struct {
	Original string
	Slice    *tui.TextSlice
	Index    tui.SliceIndex
}

func NewWord

func NewWord(original string, slice *tui.TextSlice, index tui.SliceIndex) Word

Jump to

Keyboard shortcuts

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