genlang

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArgsRequired keywordFlag = 1 << iota
	DualArgsRequired
	NoArgs
	Exclusive // limit usage of the keyword to 1 per instance
)
View Source
const (
	ScanStruct scanMode = iota
	ScanField
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct {
	Arg1 string
	Arg2 *string
}

type KeywordOpts

type KeywordOpts map[scanMode]keywordFlag

type MultiMap

type MultiMap struct {
	// contains filtered or unexported fields
}

func (MultiMap) Get

func (m MultiMap) Get(s string) []Args

func (MultiMap) GetDualArgs

func (m MultiMap) GetDualArgs(s string) iter.Seq2[string, *string]

func (MultiMap) GetIter

func (m MultiMap) GetIter(s string) iter.Seq[Args]

func (MultiMap) GetOne

func (m MultiMap) GetOne(s string) Args

func (MultiMap) GetSingleArgs

func (m MultiMap) GetSingleArgs(s string) iter.Seq[string]

func (MultiMap) Has

func (m MultiMap) Has(s string) bool

func (MultiMap) Keys

func (m MultiMap) Keys() iter.Seq[string]

type Results

type Results struct {
	Struct MultiMap
	Fields []MultiMap
}

type Scanner

type Scanner interface {
	ScanStruct(*parser.Struct) (Results, error)
}

func NewScanner

func NewScanner(keywords map[string]KeywordOpts) Scanner

Jump to

Keyboard shortcuts

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