ast

package
v0.0.0-...-28ad961 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharGroup

type CharGroup struct {
	CharCount       int
	CharCountStrict bool
	CharSetKey      string
}

func (CharGroup) IndentedString

func (cg CharGroup) IndentedString(indent string) string

func (CharGroup) Kind

func (cg CharGroup) Kind() NodeKind

func (CharGroup) String

func (cg CharGroup) String() string

type LineCountExpression

type LineCountExpression struct {
	LineCount int
	Node      Node
}

func (LineCountExpression) IndentedString

func (lce LineCountExpression) IndentedString(indent string) string

func (LineCountExpression) Kind

func (lce LineCountExpression) Kind() NodeKind

func (LineCountExpression) String

func (lce LineCountExpression) String() string

type Literal

type Literal struct {
	Value string
}

func (Literal) IndentedString

func (l Literal) IndentedString(indent string) string

func (Literal) Kind

func (l Literal) Kind() NodeKind

func (Literal) String

func (l Literal) String() string

type Node

type Node interface {
	Kind() NodeKind
	IndentedString(indent string) string
	String() string
}

type NodeKind

type NodeKind int
const (
	NodeKindPattern NodeKind = iota
	NodeKindLiteral
	NodeKindOptional
	NodeKindCharGroup
	NodeKindLineCountExpression
	NodeKindOrExpression
)

type Optional

type Optional struct {
	Node Node
}

func (Optional) IndentedString

func (o Optional) IndentedString(indent string) string

func (Optional) Kind

func (o Optional) Kind() NodeKind

func (Optional) String

func (o Optional) String() string

type OrExpression

type OrExpression struct {
	Left  Node
	Right Node
}

func (OrExpression) IndentedString

func (oe OrExpression) IndentedString(indent string) string

func (OrExpression) Kind

func (oe OrExpression) Kind() NodeKind

func (OrExpression) String

func (oe OrExpression) String() string

type Pattern

type Pattern struct {
	Nodes []Node
}

func (Pattern) IndentedString

func (p Pattern) IndentedString(indent string) string

func (Pattern) Kind

func (p Pattern) Kind() NodeKind

func (Pattern) String

func (p Pattern) String() string

Jump to

Keyboard shortcuts

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