asttest

package
v0.17.12 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEqual

func AssertEqual(t *testing.T, fns1, fns2 interface{}) bool

func NewArrayNumbers

func NewArrayNumbers(values []string) *ast.Array

NewArrayNumbers creates an Array with some number literal values.

func NewBinary

func NewBinary(left ast.Node, op string, right ast.Node) *ast.Binary

NewBinary creates a binary operation.

func NewCall

func NewCall(functionName string, arguments ...ast.Node) *ast.Call

NewCall produces a new call to functionName with any number of arguments.

func NewLiteralBool

func NewLiteralBool(b bool) *ast.Literal

NewLiteralBool create a new literal representing a boolean value.

func NewLiteralChar

func NewLiteralChar(c rune) *ast.Literal

NewLiteralChar create a new literal representing a character value.

func NewLiteralData

func NewLiteralData(data []byte) *ast.Literal

NewLiteralData create a new literal representing a data value.

func NewLiteralNumber

func NewLiteralNumber(number string) *ast.Literal

NewLiteralNumber create a new literal representing a number value.

func NewLiteralString

func NewLiteralString(str string) *ast.Literal

NewLiteralString create a new literal representing a string value.

func NewMapNumbers

func NewMapNumbers(values map[string]string) *ast.Map

NewMapNumbers creates a Map with some number literal values. This function is for convenience and should not be used for general production code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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