attrstack

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT, MIT Imports: 0 Imported by: 0 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.

Documentation

Overview

Package attrstack holds the attribute stack of the compiled evaluator of the rules.

Index

Constants

View Source
const Inline = 4

Inline is the number of entries that live in the struct itself.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

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

Stack is the visitor's attribute stack. The first Inline entries live in the struct itself so that, with evalState on the goroutine stack, nested paths do not allocate; deeper entries spill to more. Nothing takes the address of inline, which would move the whole evalState to the heap.

func (*Stack) Clear

func (s *Stack) Clear()

Clear empties the stack.

func (*Stack) Len

func (s *Stack) Len() int

Len is the number of entries on the stack.

func (*Stack) Pop

func (s *Stack) Pop()

Pop drops the last pushed entry; s must not be empty.

func (*Stack) Push

func (s *Stack) Push(v any)

Push adds v on top of the stack.

func (*Stack) Top

func (s *Stack) Top() any

Top returns the last pushed entry; s must not be empty.

Jump to

Keyboard shortcuts

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