dgo

package module
v0.0.0-...-1325006 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 6 Imported by: 0

README

dgo

Diagram generator

Parsers

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AltStmt

type AltStmt struct {
	Text string
}

type Ast

type Ast struct {
	// contains filtered or unexported fields
}

func Parse

func Parse(r io.Reader) (*Ast, error)

func (Ast) Dump

func (ast Ast) Dump()

func (Ast) Walk

func (ast Ast) Walk(fn func(AstNode))

type AstNode

type AstNode struct {
	Kind AstNodeKind
	Data any
}

func (AstNode) String

func (n AstNode) String() string

type AstNodeKind

type AstNodeKind uint8
const (
	AstNodeUndefined AstNodeKind = iota
	AstNodeDef
	AstNodeMsg
	AstNodeRsp
	AstNodeLoop
	AstNodeAlt
	AstNodeElse
	AstNodeEnd
)

func (AstNodeKind) String

func (i AstNodeKind) String() string

type DefStmt

type DefStmt struct {
	Identifier string
	Label      string
}

type Diagram

type Diagram struct {
	// contains filtered or unexported fields
}

func NewDiagram

func NewDiagram(ast *Ast) *Diagram

func (Diagram) Generate

func (d Diagram) Generate() string

type LoopStmt

type LoopStmt struct {
	Text string
}

type MsgStmt

type MsgStmt struct {
	Src   string
	Dst   string
	Label string
}

type RspStmt

type RspStmt struct {
	Src   string
	Dst   string
	Label string
}

Directories

Path Synopsis
cmd
dgo

Jump to

Keyboard shortcuts

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