pattern

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package pattern defines the shared structural match result type produced by pattern-search ports (PatternProvider) and consumed by rules as evidence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Match

type Match struct {
	File    string // repo-relative file path
	Pattern string // pattern ID from PatternDef.ID
	Text    string // matched source text
	Node    string // syntax node kind (e.g. "call_expression")
	Line    int    // 1-based line number
	Column  int    // 0-based column offset
}

Match is a single ast-grep structural match result, shared by ports (producer) and rules (consumer evidence).

Jump to

Keyboard shortcuts

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