parsebackends

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package parsebackends parses the backends.Builder API to enumerate graph building methods.

Index

Constants

This section is empty.

Variables

View Source
var MethodsBlackList = types.SetWith("Compile", "OpShape", "Name")

Functions

func BackendsDir

func BackendsDir() string

BackendsDir returns the path to the "backends" package.

func FindRepositoryRoot

func FindRepositoryRoot() string

FindRepositoryRoot returns the first directory, from the current, with the file `go.mod`, which is assumed to be repository root.

Types

type FuncInfo

type FuncInfo struct {
	Type     *ast.FuncType
	Comments []string
}

type NodeTextExtractor

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

func NewNodeTextExtractor

func NewNodeTextExtractor(fset *token.FileSet) *NodeTextExtractor

func Parse

func Parse() (*NodeTextExtractor, *ast.Package)

Parse returns the parse tree of the github.com/gomlx/gomlx/backends pacakge.

Notice ast.Package is deprecated, but the go/types package it suggests as a replacement doesn't seem to do the same thing.

func ParseBuilder

func ParseBuilder() (extractor *NodeTextExtractor, funcs map[string]FuncInfo)

func (*NodeTextExtractor) Get

func (e *NodeTextExtractor) Get(node ast.Node) string

Jump to

Keyboard shortcuts

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