noder

package standard library
go1.17.6 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: BSD-3-Clause Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Addr

func Addr(pos src.XPos, x ir.Node) *ir.AddrExpr

func Assert

func Assert(pos src.XPos, x ir.Node, typ *types.Type) ir.Node

func Binary

func Binary(pos src.XPos, op ir.Op, typ *types.Type, x, y ir.Node) ir.Node

func Call

func Call(pos src.XPos, typ *types.Type, fun ir.Node, args []ir.Node, dots bool) ir.Node

func CheckDotImports

func CheckDotImports()

CheckDotImports reports errors for any unused dot imports.

func Compare

func Compare(pos src.XPos, typ *types.Type, op ir.Op, x, y ir.Node) ir.Node

func Const

func Const(pos src.XPos, typ *types.Type, val constant.Value) ir.Node

func Deref

func Deref(pos src.XPos, typ *types.Type, x ir.Node) *ir.StarExpr

func DotField

func DotField(pos src.XPos, x ir.Node, index int) *ir.SelectorExpr

func DotMethod

func DotMethod(pos src.XPos, x ir.Node, index int) *ir.SelectorExpr

func IncDec

func IncDec(pos src.XPos, op ir.Op, x ir.Node) *ir.AssignOpStmt

func Index

func Index(pos src.XPos, typ *types.Type, x, index ir.Node) ir.Node

func LoadPackage

func LoadPackage(filenames []string)

func MethodExpr

func MethodExpr(pos src.XPos, recv ir.Node, embed *types.Type, index int) *ir.SelectorExpr

MethodExpr returns a OMETHEXPR node with the indicated index into the methods of typ. The receiver type is set from recv, which is different from typ if the method was accessed via embedded fields. Similarly, the X value of the ir.SelectorExpr is recv, the original OTYPE node before passing through the embedded fields.

func Nil

func Nil(pos src.XPos, typ *types.Type) ir.Node

func Slice

func Slice(pos src.XPos, typ *types.Type, x, low, high, max ir.Node) ir.Node

func Unary

func Unary(pos src.XPos, typ *types.Type, op ir.Op, x ir.Node) ir.Node

Types

type ImplicitNode

type ImplicitNode interface {
	ir.Node
	SetImplicit(x bool)
}

func Implicit

func Implicit(n ImplicitNode) ImplicitNode

Implicit returns n after marking it as Implicit.

Jump to

Keyboard shortcuts

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