goplus / gop

The Go+ programming language is designed for engineering, STEM education, and data science. Our vision is to enable everyone to become a builder of the digital world.
https://goplus.org
Apache License 2.0
8.91k stars 546 forks source link

qexport 自动导出工具 #67

Closed visualfc closed 8 years ago

visualfc commented 8 years ago

我写了一个go package自动导出qlang模块的工具,目前使用go tool api进行导出标准包,但如果以后改用gotools的api则可以导出所有包https://github.com/visualfc/gotools/tree/master/goapi

因为是自动导出,所以导出规则仍不完善,与qlang自带的包不太一致。

https://github.com/visualfc/qexport

Examples:

    export sync
    > qexport sync

    export html and html/template package
    > qexport html html/template

    export all package
    > qexport std
xushiwei commented 8 years ago

提个pr吧,方便大家用qlang时给自己的package生成qlang module

visualfc commented 8 years ago

现在用的是go tool api只能导标准包,我看看能否将gotools的goapi包重构来提供api导出,如果直接用ast来做也不难,但go有一些os arch 相关函数/常量处理起来比较麻烦。