parser

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRowsStreaming

func ParseRowsStreaming(reader io.Reader, controlChannel <-chan ControlMsg, batchSize int) (<-chan RowBatch, error)

Types

type ControlMsg

type ControlMsg int
const (
	RequestMore ControlMsg = iota
	Close
)

type GraphRowLine

type GraphRowLine struct {
	Segments    []*screen.Segment
	Flags       RowLineFlags
	ChangeIdIdx int
	CommitIdIdx int
}

func NewGraphRowLine

func NewGraphRowLine(segments []*screen.Segment) GraphRowLine

func (*GraphRowLine) Chop

func (gr *GraphRowLine) Chop(indent int) GraphRowLine

func (*GraphRowLine) ContainsRune

func (gr *GraphRowLine) ContainsRune(r rune, indent int) bool

func (*GraphRowLine) Extend

func (gr *GraphRowLine) Extend(indent int) GraphRowLine

func (*GraphRowLine) FindPossibleChangeIdIdx

func (gr *GraphRowLine) FindPossibleChangeIdIdx() int

func (*GraphRowLine) FindPossibleCommitIdIdx

func (gr *GraphRowLine) FindPossibleCommitIdIdx(after int) int

type Row

type Row struct {
	Commit     *jj.Commit
	Lines      []*GraphRowLine
	IsAffected bool
	Indent     int
	Previous   *Row
}

func NewGraphRow

func NewGraphRow() Row

func ParseRows

func ParseRows(reader io.Reader) []Row

func (*Row) AddLine

func (row *Row) AddLine(line *GraphRowLine)

func (*Row) Last

func (row *Row) Last(flag RowLineFlags) *GraphRowLine

func (*Row) RowLinesIter

func (row *Row) RowLinesIter(predicate RowLinesIteratorPredicate) func(yield func(line *GraphRowLine) bool)

type RowBatch

type RowBatch struct {
	Rows    []Row
	HasMore bool
}

type RowLineFlags

type RowLineFlags int
const (
	Revision RowLineFlags = 1 << iota
	Highlightable
	Elided
)

type RowLinesIteratorPredicate

type RowLinesIteratorPredicate func(f RowLineFlags) bool

func Excluding

func Excluding(flags RowLineFlags) RowLinesIteratorPredicate

func Including

func Including(flags RowLineFlags) RowLinesIteratorPredicate

Jump to

Keyboard shortcuts

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