On Mon, May 9, 2016 at 10:00 AM, Minsheng Liu <lam...@liu.ms> wrote: > 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?
It will. Even if the format was parsing-friendly, it wouldn't be a stable format. Making it parsing-friendly would be sort of making a promise that we can't keep. > Moreover, if you do not suggest parse the dumped AST, is there any > recommended way to reuse the compiler’s front-end? Using compiler APIs directly as Joe said is the best way. There are a lot of AST details that are not represented in the textual dump. 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