ingredient

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(str string, lang string) (*model.Ingredient, error)

Types

type Lexer

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

func Lex

func Lex(input string, lang string) *Lexer

Lex creates a new Lexer

func (*Lexer) Next

func (l *Lexer) Next() (Token, error, bool)

Next returns the next Token from the input. The Lexer has to be drained (all items received until itemEOF or itemError) - otherwise the Lexer goroutine will leak.

type Token

type Token struct {
	Type        tokenType
	Lexeme      string
	StartColumn int
	EndColumn   int
}

func (Token) String

func (i Token) String() string

Jump to

Keyboard shortcuts

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