gonum: gonum.org/v1/gonum/graph/formats/dot/internal/astx Index | Files

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.


Package Files

astx.go doc.go

func AppendAttr Uses

func AppendAttr(list, attr interface{}) ([]*ast.Attr, error)

AppendAttr appends attr to the given attribute list.

func AppendAttrList Uses

func AppendAttrList(optList, optAttrs interface{}) ([]*ast.Attr, error)

AppendAttrList appends the optional attrs to the given optional attribute list.

func AppendGraph Uses

func AppendGraph(file, graph interface{}) (*ast.File, error)

AppendGraph appends graph to the given file.

func AppendStmt Uses

func AppendStmt(list, stmt interface{}) ([]ast.Stmt, error)

AppendStmt appends stmt to the given statement list.

func NewAttr Uses

func NewAttr(key, val interface{}) (*ast.Attr, error)

NewAttr returns a new attribute based on the given key-value pair.

func NewAttrList Uses

func NewAttrList(attr interface{}) ([]*ast.Attr, error)

NewAttrList returns a new attribute list based on the given attribute.

func NewAttrStmt Uses

func NewAttrStmt(kind, optAttrs interface{}) (*ast.AttrStmt, error)

NewAttrStmt returns a new attribute statement based on the given graph component kind and attributes.

func NewEdge Uses

func NewEdge(directed, vertex, optTo interface{}) (*ast.Edge, error)

NewEdge returns a new edge based on the given edge direction, destination vertex and optional outgoing edge.

func NewEdgeStmt Uses

func NewEdgeStmt(from, to, optAttrs interface{}) (*ast.EdgeStmt, error)

NewEdgeStmt returns a new edge statement based on the given source vertex, outgoing edge and optional attributes.

func NewFile Uses

func NewFile(graph interface{}) (*ast.File, error)

NewFile returns a new file based on the given graph.

func NewGraph Uses

func NewGraph(strict, directed, optID, optStmts interface{}) (*ast.Graph, error)

NewGraph returns a new graph based on the given graph strictness, direction, optional ID and optional statements.

func NewID Uses

func NewID(id interface{}) (string, error)

NewID returns a new identifier based on the given ID token.

func NewNode Uses

func NewNode(id, optPort interface{}) (*ast.Node, error)

NewNode returns a new node based on the given node id and optional port.

func NewNodeStmt Uses

func NewNodeStmt(node, optAttrs interface{}) (*ast.NodeStmt, error)

NewNodeStmt returns a new node statement based on the given node and optional attributes.

func NewPort Uses

func NewPort(id, optCompassPoint interface{}) (*ast.Port, error)

NewPort returns a new port based on the given id and optional compass point.

func NewStmtList Uses

func NewStmtList(stmt interface{}) ([]ast.Stmt, error)

NewStmtList returns a new statement list based on the given statement.

func NewSubgraph Uses

func NewSubgraph(optID, optStmts interface{}) (*ast.Subgraph, error)

NewSubgraph returns a new subgraph based on the given optional subgraph ID and optional statements.

Package astx imports 4 packages (graph) and is imported by 1 packages. Updated 2019-01-30. Refresh now. Tools for package owners.