Documentation ¶
Overview ¶
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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 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 NewGraph ¶
NewGraph returns a new graph based on the given graph strictness, direction, optional ID and optional statements.
func NewNodeStmt ¶
NewNodeStmt returns a new node statement based on the given node and optional attributes.
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.
Types ¶
This section is empty.