dotlang

package
v0.0.0-...-96209b5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttrList

type AttrList map[ID]ID

func (AttrList) Build

func (al AttrList) Build(sb *strings.Builder)

type AttrStmt

type AttrStmt struct {
	Graph    bool
	Node     bool
	Edge     bool
	AttrList AttrList
}

func (*AttrStmt) Build

func (a *AttrStmt) Build(sb *strings.Builder)

func (*AttrStmt) Validate

func (a *AttrStmt) Validate() error

type CompassPt

type CompassPt uint8
const (
	CompassDefault CompassPt = iota
	CompassN
	CompassNE
	CompassE
	CompassSE
	CompassS
	CompassSW
	CompassW
	CompassNW
	CompassC
)

func (CompassPt) Build

func (cpt CompassPt) Build(sb *strings.Builder)

func (CompassPt) Validate

func (cpt CompassPt) Validate() error

type EdgeRHS

type EdgeRHS struct {
	ToID    NodeID
	ToSG    *SubGraph
	EdgeRHS *EdgeRHS
}

func (*EdgeRHS) Build

func (erhs *EdgeRHS) Build(sb *strings.Builder, digraph bool)

func (*EdgeRHS) Validate

func (erhs *EdgeRHS) Validate() error

type EdgeStmt

type EdgeStmt struct {
	FromID   NodeID
	FromSG   *SubGraph
	EdgeRHS  *EdgeRHS
	AttrList AttrList
}

func (EdgeStmt) Build

func (e EdgeStmt) Build(sb *strings.Builder, digraph bool)

func (EdgeStmt) Validate

func (e EdgeStmt) Validate() error

type Graph

type Graph struct {
	Strict    bool
	DiGraph   bool
	ID        ID
	Nodes     []NodeStmt
	Edges     []EdgeStmt
	Attrs     []*AttrStmt
	SubGraphs []*SubGraph
}

func (*Graph) Build

func (g *Graph) Build(sb *strings.Builder)

func (*Graph) Validate

func (g *Graph) Validate() error

type ID

type ID string

func (ID) Build

func (id ID) Build(sb *strings.Builder)

type NodeID

type NodeID struct {
	ID   ID
	Port Port
}

func (NodeID) Build

func (nid NodeID) Build(sb *strings.Builder)

func (NodeID) Validate

func (nid NodeID) Validate() error

type NodeStmt

type NodeStmt struct {
	ID       NodeID
	AttrList AttrList
}

func (NodeStmt) Build

func (n NodeStmt) Build(sb *strings.Builder)

func (NodeStmt) Validate

func (n NodeStmt) Validate() error

type Port

type Port struct {
	ID        ID
	CompassPt CompassPt
}

func (Port) Build

func (p Port) Build(sb *strings.Builder)

func (Port) Validate

func (p Port) Validate() error

type SubGraph

type SubGraph struct {
	ID        ID
	Nodes     []NodeStmt
	Edges     []EdgeStmt
	Attrs     []*AttrStmt
	SubGraphs []*SubGraph
}

func (*SubGraph) Build

func (sg *SubGraph) Build(sb *strings.Builder, digraph bool)

func (*SubGraph) Validate

func (sg *SubGraph) Validate() error

Jump to

Keyboard shortcuts

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