flag

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FlagName = map[Type]string{
		QuotedString: "QuotedString",
		EOF:          "Eof",
		Keyword:      "Keyword",
		Variable:     "Variable",
		BlockStart:   "BlockStart",
		BlockEnd:     "BlockEnd",
		Semicolon:    "Semicolon",
		Comment:      "Comment",
		Illegal:      "Illegal",
		Regex:        "Regex",
	}
)

Functions

This section is empty.

Types

type Flag

type Flag struct {
	Type    Type
	Literal string
	Line    int
	Column  int
}

func (Flag) EqualTo

func (t Flag) EqualTo(t2 Flag) bool

func (Flag) Is

func (t Flag) Is(typ Type) bool

func (Flag) IsParameterEligible

func (t Flag) IsParameterEligible() bool

func (Flag) Lit

func (t Flag) Lit(literal string) Flag

func (Flag) String

func (t Flag) String() string

type Flags

type Flags []Flag

func (Flags) EqualTo

func (fs Flags) EqualTo(flags Flags) bool

type Type

type Type int
const (
	EOF Type = iota
	Eol
	Keyword
	QuotedString
	Variable
	BlockStart
	BlockEnd
	Semicolon
	Comment
	Illegal
	Regex
)

func (Type) String

func (tt Type) String() string

Jump to

Keyboard shortcuts

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