Thanks for your information. However, what I intend to work on is a Swift-to-JS translator, which I guess probably need to stick with the upstream anyway. I think that make the output a bit more parsing-friendly will not harm, will it?
Moreover, if you do not suggest parse the dumped AST, is there any recommended way to reuse the compiler’s front-end? Thank you, Minsheng Dmitri Gribenko <griboz...@gmail.com>于2016年5月9日周一 上午9:10写道: > On Sun, May 8, 2016 at 8:22 PM, Minsheng Liu via swift-dev > <swift-dev@swift.org> wrote: > > Hi, > > > > I notice that currently the dumped AST contains a parsing-unfriendly > “decl” > > attribute like this: > >> decl=fib.(file).func decl.b@fib.swift:4:9 > > Dumped AST is not meant to be machine parseable. The format is > subject to change (and it does frequently change). Please don't parse > it, your tools will break with new compiler releases. > > Dmitri > > -- > main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if > (j){printf("%d\n",i);}}} /*Dmitri Gribenko <griboz...@gmail.com>*/ >
_______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev