parser

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package parser Analyses a given string of text and extracts any configmanager tokens

It builds any additiona metadata as part of the analysis

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoEndTagFound                 = errors.New("no corresponding end tag found")
	ErrUnableToReplaceVarPlaceholder = errors.New("variable specified in the content was not found in the environment")
)
View Source
var ErrMetadataEmpty = errors.New("emtpy metadata")

Functions

This section is empty.

Types

type ConfigManagerTokenBlock

type ConfigManagerTokenBlock struct {
	BeginToken  token.Token
	ParsedToken config.ParsedTokenConfig
	EndToken    token.Token
}

type Parser

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

func New

func New(l *lexer.Lexer, c *config.GenVarsConfig) *Parser

func (*Parser) Parse

func (p *Parser) Parse() ([]ConfigManagerTokenBlock, []error)

Parse creates a flat list of ConfigManagerTokenBlock In the order they were declared in the source text

The parser does not do a second pass and interprets the source from top to bottom

func (*Parser) WithLogger

func (p *Parser) WithLogger(logger log.ILogger) *Parser

Jump to

Keyboard shortcuts

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