grammar

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

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

Go to latest
Published: Apr 10, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PathParser = participle.MustBuild(&Path{},
	participle.Lexer(pathLexer),
)
View Source
var PointParser = participle.MustBuild(&Point{},
	participle.Lexer(pathLexer),
)

Functions

This section is empty.

Types

type Path

type Path struct {
	Open RawPath `"[" @@ "]"`
}

func (Path) Points

func (p Path) Points() []RawPoint

type PathPointer

type PathPointer interface {
	Points() []RawPoint
}

type Point

type Point struct {
	Closed *RawPoint `("(" @@ ")")`
	Open   *RawPoint `| @@`
}

func (Point) Value

func (p Point) Value() RawPoint

type PointValuer

type PointValuer interface {
	Value() RawPoint
}

type RawPath

type RawPath struct {
	Points []Point `@@ ("," @@)*`
}

type RawPoint

type RawPoint struct {
	X int `@Natural`
	Y int `"," @Natural`
}

func (RawPoint) Value

func (p RawPoint) Value() RawPoint

Jump to

Keyboard shortcuts

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