# Functions
Compile compiles a parsed gopatch Program.
NewChangelog builds a new, empty Changelog.
Sprint is used primarily for debugging and prints a readable representation of the provided value.
# Structs
Change is a single Change in a program.
Changelog records the ranges of positions changed over the course of successive patches.
FileMatcher matches Go files.
FileReplacer replaces an ast.File.
ForDotsMatcher represents a "for ..." stmt, matching both, for and range statements.
ForDotsReplacer replaces a "for ...".
GenericNodeMatcher is the top-level matcher for ast.Node objects.
ImportMatcher matches a single import.
ImportReplacer replaces imports in a file.
ImportsMatcher matches multiple imports in a Go file.
ImportsReplacer replaces a block of imports.
InterfaceMatcher matches an interface value.
InterfaceReplacer replaces an interface value.
Interval represents a consecutive set of positions in the source file.
Meta is the compiled representaton of a Meta section.
MetavarMatcher is compiled from a metavarible occurring in the minus section of the patch.
MetavarReplacer is compiled from a metavarible occurring in the plus section of the patch.
PosMatcher matches token.Pos fields in an AST.
PosReplacer replaces token.Pos fields.
Program is a collection of compiled changes.
PtrMatcher matches a non-nil pointer in the AST.
PtrReplacer replaces a pointer type.
Region denotes the portion of the code being matched, i.e.
SearchMatcher runs a Matcher on descendants of an AST, producing SearchResults into Data.
SearchReplacer replaces nodes found by a SearchMatcher.
SearchResult contains information about search results found by a SearchMatcher.
SliceDotsMatcher implements support for "..." in portions of the AST where slices of values are expected.
SliceDotsReplacer replaces target nodes and reproduces the values captured by "..." in places which the AST expects a slice.
SliceMatcher matches a slice of values exactly.
SliceReplacer replaces a slice of values.
StructMatcher matches a struct.
StructReplacer replaces a struct.
ValueMatcher matches a value as-is.
ValueReplacer replace a value as-is.
ZeroReplacer replaces with a zero value.
# Interfaces
Matcher matches values in a Go AST.
Replacer generates portions of the Go AST meant to replace sections matched by a Matcher.
SearchNode provides access to an AST node, its parent, and its positional information during a traversal.
# Type aliases
MetavarType defines the different types of metavariables accepted in a '@@' section.
Searcher inspects the given Node using the given Matcher and returns a non-nil SearchResult if it matched.