walk

package
v1.4.14 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: ISC Imports: 1 Imported by: 2

README

walk

-- import "vimagination.zapto.org/javascript/walk"

Package walk provides a javascript type walker

Usage

func Walk
func Walk(t javascript.Type, fn Handler) error

Walk calls the Handle function on the given interface for each non-nil, non-Token field of the given javascript type

type Handler
type Handler interface {
	Handle(javascript.Type) error
}

Handler is used to process javascript types

type HandlerFunc
type HandlerFunc func(javascript.Type) error

HandlerFunc wraps a func to implement Handler interface

func (HandlerFunc) Handle
func (h HandlerFunc) Handle(t javascript.Type) error

Handle implements the Handler interface

Documentation

Overview

Package walk provides a javascript type walker

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Walk

func Walk(t javascript.Type, fn Handler) error

Walk calls the Handle function on the given interface for each non-nil, non-Token field of the given javascript type

Types

type Handler

type Handler interface {
	Handle(javascript.Type) error
}

Handler is used to process javascript types

type HandlerFunc

type HandlerFunc func(javascript.Type) error

HandlerFunc wraps a func to implement Handler interface

func (HandlerFunc) Handle

func (h HandlerFunc) Handle(t javascript.Type) error

Handle implements the Handler interface

Jump to

Keyboard shortcuts

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