validate

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package validate handles validation of the parsed tree structure

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(nodes []*parse.Node) error

Validate checks the tree for syntax and semantic errors

Types

type ErrorType

type ErrorType int

ErrorType represents the type of validation error

const (
	ErrorDuplicatePath ErrorType = iota
	ErrorPathTooLong
	ErrorPathTraversal
	ErrorInvalidCharacters
	ErrorReservedName
)

type ValidationError

type ValidationError struct {
	Path    string // Path where error occurred
	Message string // Error message
	Type    ErrorType
}

ValidationError represents a validation error

func (*ValidationError) Error

func (e *ValidationError) Error() string

type ValidationResult

type ValidationResult struct {
	Errors []error
	Valid  bool
}

ValidationResult contains all validation errors found

Jump to

Keyboard shortcuts

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