Skip to content

wsy998/ast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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