ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
写测试模块的时候不必频繁导出函数 –compile(export_all) 就可以导出所有函数 ```erlang 编译模块 1.-compile( export_all )    2.-compile( {parse_transform,Module} ).    Module:parse_transform/2 auses the parse transformation function Module:parse_transform/2 to be applied to the parsed code before the code is checked for errors. 在编译器检查错误之前会把所有代码送入 Module:parse_transform/2,所以 Module:parse_transform/2的返回值需要是代码串 例子: a.erl -compile( {parse_transform,b} ). b.erl -export( [parse_transform/2] ). parse_transform( Code, Option ) -> Fun(), Code. file(File, Options) -> CompRet {outdir,Dir} export_all {i,Dir} {d,Macro} {d,Macro,Value} from_core (t_lib, [to_core]). c(t_lib, [from_core]). ```