asthelper

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package asthelper implements utility functions for AST.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DocContains

func DocContains(group *ast.CommentGroup, s string) bool

DocContains returns true if the comment group contains the given string.

func ExtractLHSRHS

func ExtractLHSRHS(node ast.Node) (lhs, rhs []ast.Expr)

ExtractLHSRHS extracts the left-hand side and right-hand side of an assignment statement or a variable declaration

func PrintExpr

func PrintExpr(e ast.Expr, pass *analysis.Pass, isShortenExpr bool) (string, error)

PrintExpr converts AST expression to string, and shortens long expressions if isShortenExpr is true

Types

This section is empty.

Jump to

Keyboard shortcuts

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