scopes

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Uniq

func Uniq(s Scope, name string) *ast.Ident

Types

type IfScope

type IfScope struct {
	ThenScope, ElseScope *ListScope
}

func NewIfScope

func NewIfScope(parent Scope, node *parse.IfNode) *IfScope

type ListScope

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

func NewListScope

func NewListScope(parent Scope, node *parse.ListNode) *ListScope

func (*ListScope) Dollar

func (s *ListScope) Dollar() *ast.Ident

func (*ListScope) Dot

func (s *ListScope) Dot() *ast.Ident

type RangeScope

type RangeScope struct {
	ElseScope *ListScope // nil if no ElseList
	// contains filtered or unexported fields
}

func NewRangeScope

func NewRangeScope(parent Scope, node *parse.RangeNode) *RangeScope

func (*RangeScope) Dollar

func (s *RangeScope) Dollar() *ast.Ident

func (*RangeScope) Dot

func (s *RangeScope) Dot() *ast.Ident

func (*RangeScope) Key

func (s *RangeScope) Key() *ast.Ident

func (*RangeScope) List

func (s *RangeScope) List() *ast.Ident

func (*RangeScope) Value

func (s *RangeScope) Value() *ast.Ident

type RootScope

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

func NewRootScope

func NewRootScope(node *parse.ListNode) *RootScope

func (*RootScope) Dollar

func (s *RootScope) Dollar() *ast.Ident

func (*RootScope) Dot

func (s *RootScope) Dot() *ast.Ident

type Scope

type Scope interface {
	Dot() *ast.Ident    // .
	Dollar() *ast.Ident // $
	// contains filtered or unexported methods
}

type WithScope

type WithScope struct {
	ElseScope *ListScope
	// contains filtered or unexported fields
}

func NewWithScope

func NewWithScope(parent Scope, node *parse.WithNode) *WithScope

func (*WithScope) Dollar

func (s *WithScope) Dollar() *ast.Ident

func (*WithScope) Dot

func (s *WithScope) Dot() *ast.Ident

Jump to

Keyboard shortcuts

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