parser

package
v0.3.1-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANNOTATION_OPT = "@knit"
	ANNOTATION_BEG = "@+knit"
	ANNOTATION_END = "@!knit"

	BEG_PATTERN    = `(.*)@\+knit(.*)`
	END_PATTERN    = `(.*)@!knit(.*)`
	OPTION_PATTERN = "@knit.(\\w*).([^`\\n]*)(?:`((.|\\n)*?(?<!\\\\))`)?"

	GROUP_OPTION_TYPE    = 1
	GROUP_OPTION_VALUE   = 2
	GROUP_OPTION_LITERAL = 3
)

Variables

This section is empty.

Functions

func EndAnnotation

func EndAnnotation(input string) (string, error)

Types

type Option

type Option struct {
	Type    string
	Value   string
	Literal string
}

Option represents options read through the regex parser.

func Options

func Options(input string) ([]*Option, error)

type OptionType

type OptionType = string
const (
	Input    OptionType = "input"
	Loader   OptionType = "loader"
	Variable OptionType = "variable"
	Template OptionType = "template"
)

Jump to

Keyboard shortcuts

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