> You say this, but... I really hate for you to spend a lot of time on > something that is so low-level and that is so likely to be unstable. I think > it would make a lot more sense to write a C API to the AST and talk to it > over the OCaml FFI. Or if you really want to avoid the FFI, you could take > our current ASTDumper output, which is currently pseudo-machine-readable, and > make it actually machine-readable. The elegant approach there would be to > take the entire dumper and remove its pervasive dependence on an output > stream; instead, it would be rewritten to make calls on a SAX-like streaming > interface, and there would just be a standard implementation that formatted > things as XML / JSON / our weird s-expression format.
Yes, I would like to avoid FFI. The second option could work well. I’ll look into it more. One benefit of not using ASTDumper is that haxe could generate swift without needing external tools. Thanks again, the info is very helpful. Aaron _______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev