ptrls

package module
v0.0.0-...-46e5af0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2022 License: MIT Imports: 9 Imported by: 0

README

ptrls

Install

$ go install github.com/gostaticanalysis/ptrls/cmd/ptrls@latest

Usage

$ cd testdata/a
$ cat a.go
package main

func main() {
	f(map[string]int{})
	f(map[string]int{})
}

func f(m map[string]int) {
	println(len(m))
}
$ ptrls `pwd`/a.go 80
m
	 a.go:4:18 map[string]int
	 a.go:5:18 map[string]int

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(prog *Program, poses ...token.Pos) (map[ast.Node]pointer.Pointer, error)

Types

type Program

type Program struct {
	SSA       *ssa.Program
	Main      *ssa.Package
	SrcFuncs  []*ssa.Function
	Fset      *token.FileSet
	TypesInfo *types.Info
	Files     []*ast.File
}

func Load

func Load(patterns ...string) (*Program, error)

func (*Program) Path

func (prog *Program) Path(pos token.Pos) (path []ast.Node, exact bool)

func (*Program) Pos

func (prog *Program) Pos(filename string, offset int) token.Pos

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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