astutil

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

This package contains utility functions used by pkg/proc to generate ast.Expr expressions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func And

func And(x, y ast.Expr) ast.Expr

And returns an expression evaluating 'x && y'.

func Eql

func Eql(x, y ast.Expr) *ast.BinaryExpr

Eql returns an expression evaluating 'x == y'.

func Int

func Int(n int64) *ast.BasicLit

Int returns an expression representing the integer 'n'.

func Or

func Or(x, y ast.Expr) ast.Expr

Or returns an expression evaluating 'x || y'.

func PkgVar

func PkgVar(pkg, v string) *ast.SelectorExpr

PkgVar returns an expression evaluating 'pkg.v'.

func Sel

func Sel(x ast.Expr, sel string) *ast.SelectorExpr

Sel returns an expression evaluating 'x.sel'.

Types

This section is empty.

Jump to

Keyboard shortcuts

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