From e7a69fbe4e33602dd6f78d140aafa5125b8eec71 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Wed, 1 Aug 2012 11:56:46 -0700 Subject: Working on documentation of pipes. --- src/libsyntax/ext/pipes.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ext/pipes.rs b/src/libsyntax/ext/pipes.rs index 5a1462cea30..08562c4490f 100644 --- a/src/libsyntax/ext/pipes.rs +++ b/src/libsyntax/ext/pipes.rs @@ -1,3 +1,37 @@ +/*! Implementation of proto! extension. + +This is frequently called the pipe compiler. It handles code such as... + +~~~ +proto! pingpong { + ping: send { + ping -> pong + } + pong: recv { + pong -> ping + } +} +~~~ + +There are several components: + + * The parser (libsyntax/ext/pipes/parse_proto.rs) + * Responsible for building an AST from a protocol specification. + + * The checker (libsyntax/ext/pipes/check.rs) + * Basic correctness checking for protocols (i.e. no undefined states, etc.) + + * The analyzer (libsyntax/ext/pipes/liveness.rs) + * Determines whether the protocol is bounded or unbounded. + + * The compiler (libsynatx/ext/pipes/pipec.rs) + * Generates a Rust AST from the protocol AST and the results of analysis. + +There is more documentation in each of the files referenced above. + +FIXME (#3072) - This is still incomplete. + +*/ import codemap::span; import ext::base::ext_ctxt; -- cgit 1.4.1-3-g733a5