astcmp

package
v0.0.0-...-c33a17c Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(x, y ast.Node, mode Mode) bool

Equal returns true if the two nodes have equal values. Two nodes are considered equal if they have the same type and the same underlying values (regardless of whether they have the same pointer address), and if, by recursion, their children are also equal. Equal does not compare objects or scopes. If conf is nil, the Default config will be used.

Types

type Mode

type Mode uint

A Mode value is a set of flags (or 0). They control how nodes are compared.

const (
	// IgnorePos means that position information will be ignored and two nodes
	// will be considered equal even if they have different positions.
	IgnorePos Mode = 1 << iota
	// IgnoreUnresolved means that for any *ast.File, the Undeclared field will
	// be ignored.
	IgnoreUnresolved
)

Jump to

Keyboard shortcuts

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