Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 527 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 527 Bytes

ast

Based on the official AST package, support single files and single packages, but currently do not support package-level variables and struct composition. 中文文档

Features

Parse a single file or single package, and retrieve all the structs and functions within the file or package.

Installation

go get -u github.com/wsy998/ast

Usage

func Parse(file string) (*GoFile, error){} // parse single file
func ParsePackage(pkg string) (*GoPkg, error){} // parse single package