[swift-dev] Consider removing the space in Swift AST dump's "decl" attribute?

Minsheng Liu lambda at liu.ms
Mon May 9 12:00:56 CDT 2016

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,

Dmitri Gribenko <gribozavr at gmail.com>于2016年5月9日周一 上午9:10写道:

> On Sun, May 8, 2016 at 8:22 PM, Minsheng Liu via swift-dev
> <swift-dev at 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 at 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 <gribozavr at gmail.com>*/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160509/be4c5e62/attachment.html>

More information about the swift-dev mailing list