package astx
import "gonum.org/v1/gonum/graph/formats/dot/internal/astx"
Package astx implements utility functions for generating abstract syntax trees of Graphviz DOT graphs.
Index ¶
- func AppendAttr(list, attr interface{}) ([]*ast.Attr, error)
- func AppendAttrList(optList, optAttrs interface{}) ([]*ast.Attr, error)
- func AppendGraph(file, graph interface{}) (*ast.File, error)
- func AppendStmt(list, stmt interface{}) ([]ast.Stmt, error)
- func NewAttr(key, val interface{}) (*ast.Attr, error)
- func NewAttrList(attr interface{}) ([]*ast.Attr, error)
- func NewAttrStmt(kind, optAttrs interface{}) (*ast.AttrStmt, error)
- func NewEdge(directed, vertex, optTo interface{}) (*ast.Edge, error)
- func NewEdgeStmt(from, to, optAttrs interface{}) (*ast.EdgeStmt, error)
- func NewFile(graph interface{}) (*ast.File, error)
- func NewGraph(strict, directed, optID, optStmts interface{}) (*ast.Graph, error)
- func NewID(id interface{}) (string, error)
- func NewNode(id, optPort interface{}) (*ast.Node, error)
- func NewNodeStmt(node, optAttrs interface{}) (*ast.NodeStmt, error)
- func NewPort(id, optCompassPoint interface{}) (*ast.Port, error)
- func NewStmtList(stmt interface{}) ([]ast.Stmt, error)
- func NewSubgraph(optID, optStmts interface{}) (*ast.Subgraph, error)
Functions ¶
func AppendAttr ¶
AppendAttr appends attr to the given attribute list.
func AppendAttrList ¶
AppendAttrList appends the optional attrs to the given optional attribute list.
func AppendGraph ¶
AppendGraph appends graph to the given file.
func AppendStmt ¶
AppendStmt appends stmt to the given statement list.
func NewAttr ¶
NewAttr returns a new attribute based on the given key-value pair.
func NewAttrList ¶
NewAttrList returns a new attribute list based on the given attribute.
func NewAttrStmt ¶
NewAttrStmt returns a new attribute statement based on the given graph component kind and attributes.
func NewEdge ¶
NewEdge returns a new edge based on the given edge direction, destination vertex and optional outgoing edge.
func NewEdgeStmt ¶
NewEdgeStmt returns a new edge statement based on the given source vertex, outgoing edge and optional attributes.
func NewFile ¶
NewFile returns a new file based on the given graph.
func NewGraph ¶
NewGraph returns a new graph based on the given graph strictness, direction, optional ID and optional statements.
func NewID ¶
NewID returns a new identifier based on the given ID token.
func NewNode ¶
NewNode returns a new node based on the given node id and optional port.
func NewNodeStmt ¶
NewNodeStmt returns a new node statement based on the given node and optional attributes.
func NewPort ¶
NewPort returns a new port based on the given id and optional compass point.
func NewStmtList ¶
NewStmtList returns a new statement list based on the given statement.
func NewSubgraph ¶
NewSubgraph returns a new subgraph based on the given optional subgraph ID and optional statements.
Source Files ¶
astx.go doc.go
- Version
- v0.15.1 (latest)
- Published
- Aug 16, 2024
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 12 hours ago –
Tools for package owners.