comment

package
v1.7.11-integrations Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 2 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

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

Comment - struct with comment value and its position on file

func (Comment) IsEmpty

func (c Comment) IsEmpty() bool

IsEmpty returns true if comment is empty, otherwise returns false

func (Comment) Line

func (c Comment) Line() int

Line returns the line comment starts

func (Comment) Value

func (c Comment) Value() string

Value returns comment value

type Parser

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

Parser represents a list of code tokens

func NewParser

func NewParser(src []byte, filename string) (*Parser, error)

NewParser parses the content of a file and return a parser with its tokens

func (*Parser) ParseCommentsForNode

func (p *Parser) ParseCommentsForNode(rg hcl.Range) (startComment, leadComment Comment)

ParseCommentsForNode returns a comment in the range given in rg, if exists

Jump to

Keyboard shortcuts

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