Skip to content

Instantly share code, notes, and snippets.

@eholk
Created May 18, 2011 00:09
Show Gist options
  • Save eholk/977721 to your computer and use it in GitHub Desktop.
Save eholk/977721 to your computer and use it in GitHub Desktop.
alt-block
fn trans_spawn(&ast::spawn_dom dom, &option::t[str] name,
&@ast::expr func, &vec[@ast::expr] args,
&ast::ann ann) -> result {
// Make the task name
let str tname = alt(name) {
case(none) {
auto argss = vec::map(common::expr_to_str, args);
#fmt("%s(%s)",
common::expr_to_str(func),
str::connect(argss, ", "));
}
case(some(?n)) {
n;
}
};
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment