referenceparser

package module
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

YAMLStar reference parser plugin

This repository provides the generated Go distribution of the YAML reference parser maintained in yaml/yaml-reference-parser-clj.

The Clojure project remains the canonical parser source. This module compiles its released source artifact with Gloat and exposes the result as an ordinary Go package. Consumers do not need Gloat, Clojure, a C compiler, or a shared library.

events, err := parser.Parse([]byte("answer: 42\n"))

Version v0.2.6 is generated from org.yamlstar/yaml-parser version 0.2.6. The source release uses the v0.2.6 Git tag in yaml/yaml-reference-parser-clj. This generated module also uses only the v0.2.6 Git tag. Go consumers can select either 0.2.6 or v0.2.6 in plugin configuration, while documentation and release tags use the v prefix.

To regenerate from a local source checkout before that artifact is published:

make generate YAML_PARSER_DIR=../yaml-reference-parser-clj

Run the complete local validation before tagging a release:

make check-generated YAML_PARSER_DIR=../yaml-reference-parser-clj
make test

Release the version recorded in Makefile with:

make release v=0.2.6

The command validates tests and generated sources, publishes a clean local main when it is strictly ahead of origin/main, and creates the v0.2.6 tag and GitHub release. It never creates an unprefixed version tag. Use d=1 to print the release action without publishing it.

Parser extensions

parser.ParseWith(input, namespace) invokes a generated namespace's parse function and converts its event maps under the same lock as parser.Parse. Extensions import their generated namespace and depend on this module, so base and extension parsing share one initialized runtime.

Documentation

Overview

Package referenceparser exposes the generated YAML reference parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize() error

Initialize loads the generated parser namespaces once.

Types

type Event

type Event = parser.Event

Event is one YAML parser event.

func Parse

func Parse(input []byte) ([]Event, error)

Parse returns YAML parser events without a serialization round trip.

Directories

Path Synopsis
internal
Package parser exposes the generated YAML reference parser.
Package parser exposes the generated YAML reference parser.

Jump to

Keyboard shortcuts

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