parser

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 5 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, done <-chan struct{}) <-chan RowBatch

Types

type ControlMsg

type ControlMsg int
const (
	RequestMore ControlMsg = iota
	Close
)

type GraphGutter added in v0.9.1

type GraphGutter struct {
	Segments []*screen.Segment
}

type GraphRowLine

type GraphRowLine struct {
	Segments []*screen.Segment
	Gutter   GraphGutter
	Flags    RowLineFlags
}

func NewGraphRowLine

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

func (*GraphRowLine) GetSegments added in v0.10.0

func (gr *GraphRowLine) GetSegments() []*screen.Segment

func (*GraphRowLine) ParseRowPrefixes added in v0.9.7

func (gr *GraphRowLine) ParseRowPrefixes() (int, string, string)

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

ParseRows reads all rows from the provided reader and returns them as a slice. It is used for `jj log` and `jj evolog` commands

func (*Row) AddLine

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

func (*Row) Extend added in v0.9.1

func (row *Row) Extend() GraphGutter

func (*Row) Get added in v0.9.1

func (row *Row) Get(line int, col int) (rune, bool)

func (*Row) GetLane added in v0.9.1

func (row *Row) GetLane(line int, col int) uint64

func (*Row) GetNodeIndex added in v0.9.1

func (row *Row) GetNodeIndex() int

func (*Row) GetSearchableLines added in v0.10.0

func (row *Row) GetSearchableLines() []screen.SearchableLine

func (*Row) Last

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

func (*Row) RowLinesIter

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

func (*Row) SetLane added in v0.9.1

func (row *Row) SetLane(line int, col int, lane uint64)

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

Jump to

Keyboard shortcuts

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