graph

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDot

func CreateDot(node dst.Node, out io.Writer) error

CreateDot creates a dot representation of the graph associated with a dst node.

func Walk

func Walk(root *Node) (string, error)

Walk walks the graph starting at the argument root and returns a graphviz (dot) representation.

Types

type Edge

type Edge struct {
	Dest         *Node
	Relationship string
}

Edge is a representation of an edge in the AST graph.

type Node

type Node struct {
	Type  string
	Value string
	Node  dst.Node
	Edges []*Edge
	// contains filtered or unexported fields
}

Node is a representation of a node in the AST graph.

func NodeToGraphNode

func NodeToGraphNode(node dst.Node) *Node

Jump to

Keyboard shortcuts

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