comments

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package comments extracts and diffs comments across source files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentBlock

type CommentBlock = treesitter.CommentBlock

CommentBlock represents an extracted comment and its source position.

func CollectTrivia added in v0.12.0

func CollectTrivia(root *treesitter.ASTNode) []*CommentBlock

CollectTrivia walks the AST and gathers all attached comment trivia.

func ExtractComments

func ExtractComments(root *treesitter.ASTNode) []CommentBlock

ExtractComments returns all comment blocks attached to an AST in source order.

type DiffResult

type DiffResult struct {
	Actions      []actions.Action
	LineMappings map[int]int
}

DiffResult holds actions produced from diffing comments.

func DiffComments

func DiffComments(srcComments, dstComments []CommentBlock, mappings *engine.Mapping) *DiffResult

DiffComments matches and diffs comments between source and destination files using AST mapping awareness.

Jump to

Keyboard shortcuts

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