parser

package
v0.0.0-...-2c5e771 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldFormatting

type FieldFormatting struct {
	// Color for field node; nil means default
	Color *color.RGBA
	// Styling
	Bold, Italic, Underline bool
}

type Node

type Node struct {
	// If false, this is a literal string
	IsField bool
	// For fields, the value is the key (no @ included)
	// For literals, it is the literal value (with escaped @s unescaped)
	Value string
	// The amount of width to pad to (for fields only)
	// zero means fill
	Width int
	// Formatting; nil for literals
	FieldFormatting *FieldFormatting
}

func Parse

func Parse(s string) ([]Node, error)

Jump to

Keyboard shortcuts

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