a python wrapper for the built-in go parser using c-types
Project description
gopyast
python wrapper for the built-in go ast parser
installation
pip install goastpy
usage:
import goastpy
if __name__ == '__main__':
code = '''
package main
import "fmt"
func main() {
fmt.Println("Hello, World!")
}
'''
parsed_code = goastpy.GoAst(code)
print(parsed_code.ast)
building the c-shared golang files:
cd ./goastpy
go build -o goastparser.so -buildmode=c-shared main.go goastparser_export.go
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
goastpy-0.1.8.tar.gz
(4.7 MB
view hashes)