parser

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGoFile

func ParseGoFile(filePath string) (*token.FileSet, *ast.File, error)

ParseGoFile parse the given Go file and return the file set and the AST node

func TraverseAST

func TraverseAST(node *ast.File, fn func(ast.Node) bool)

TraverseAST traverse the given AST node and call the given function for each node

func WriteGoFile

func WriteGoFile(filePath string, fileSet *token.FileSet, node *ast.File) error

WriteGoFile write the given AST node to the given file path

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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