d2compiler

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MPL-2.0 Imports: 14 Imported by: 8

Documentation

Overview

Package d2compiler implements a parser, compiler and autoformatter for the Terrastruct d2 diagramming language.

Index

Constants

This section is empty.

Variables

View Source
var FullToShortLanguageAliases map[string]string
View Source
var ShortToFullLanguageAliases = map[string]string{
	"md":  "markdown",
	"tex": "latex",
	"js":  "javascript",
	"go":  "golang",
	"py":  "python",
	"rb":  "ruby",
	"ts":  "typescript",
}

TODO add more, e.g. C, bash

Functions

func Compile

func Compile(path string, r io.RuneReader, opts *CompileOptions) (*d2graph.Graph, error)

Types

type CompileOptions

type CompileOptions struct {
	UTF16 bool
}

Jump to

Keyboard shortcuts

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