Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs #247

Merged
2 commits merged into from
Mar 2, 2011
Merged

Docs #247

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions doc/rust.texi
Original file line number Diff line number Diff line change
Expand Up @@ -1990,22 +1990,22 @@ module system).
An example of a @code{tag} item and its use:
@example
tag animal @{
dog();
cat();
dog;
cat;
@}

let animal a = dog();
a = cat();
let animal a = dog;
a = cat;
@end example

An example of a @emph{recursive} @code{tag} item and its use:
@example
tag list[T] @{
nil();
nil;
cons(T, @@list[T]);
@}

let list[int] a = cons(7, cons(13, nil()));
let list[int] a = cons(7, cons(13, nil));
@end example


Expand Down Expand Up @@ -3401,9 +3401,9 @@ control enters the block.
An example of a pattern @code{alt} statement:

@example
type list[X] = tag(nil(), cons(X, @@list[X]));
type list[X] = tag(nil, cons(X, @@list[X]));

let list[int] x = cons(10, cons(11, nil()));
let list[int] x = cons(10, cons(11, nil));

alt (x) @{
case (cons(a, cons(b, _))) @{
Expand Down
1 change: 0 additions & 1 deletion src/README
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ boot/fe - Front end (lexer, parser, AST)
boot/me - Middle end (resolve, check, layout, trans)
boot/be - Back end (IL, RA, insns, asm, objfiles)
boot/util - Ubiquitous helpers
boot/llvm - LLVM-based alternative back end
boot/driver - Compiler driver

comp/ The self-hosted compiler ("rustc": incomplete)
Expand Down