parser

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 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 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) ParseRowPrefixes added in v0.9.7

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

type LaneTracer added in v0.9.1

type LaneTracer interface {
	IsInSameLane(current int) bool
	IsGutterInLane(current int, lineIndex int, segmentIndex int) bool
	UpdateGutterText(current int, lineIndex int, segmentIndex int, text string) string
}

func NewNoopTracer added in v0.9.1

func NewNoopTracer() LaneTracer

func NewTracer added in v0.9.1

func NewTracer(rows []Row, cursor int, start int, end int) LaneTracer

type NoopTracer added in v0.9.1

type NoopTracer struct{}

func (NoopTracer) IsGutterInLane added in v0.9.1

func (n NoopTracer) IsGutterInLane(int, int, int) bool

func (NoopTracer) IsInSameLane added in v0.9.1

func (n NoopTracer) IsInSameLane(int) bool

func (NoopTracer) UpdateGutterText added in v0.9.1

func (n NoopTracer) UpdateGutterText(_ int, _ int, _ int, text 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) 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

func Excluding

func Excluding(flags RowLineFlags) RowLinesIteratorPredicate

func Including

func Including(flags RowLineFlags) RowLinesIteratorPredicate

type Tracer added in v0.9.1

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

func (*Tracer) IsGutterInLane added in v0.9.1

func (t *Tracer) IsGutterInLane(current int, lineIndex int, segmentIndex int) bool

func (*Tracer) IsInSameLane added in v0.9.1

func (t *Tracer) IsInSameLane(current int) bool

func (*Tracer) UpdateGutterText added in v0.9.1

func (t *Tracer) UpdateGutterText(current int, lineIndex int, i int, text string) string

Jump to

Keyboard shortcuts

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