Add hacks to extract and compile tutorial code

Not included in the build by default, since it's fragile and kludgy. Do
something like this to run it:

    cd doc/tutorial
    RUSTC=../../build/stage2/bin/rustc bash test.sh

Closes #1143
This commit is contained in:
Marijn Haverbeke 2011-11-22 16:12:23 +01:00
parent 1b8b0b8584
commit fedb775fbb
14 changed files with 119 additions and 24 deletions

View file

@ -2485,22 +2485,12 @@ fn parse_crate_directive(p: parser, first_outer_attr: [ast::attribute]) ->
_ { none }
};
alt p.peek() {
// mod x = "foo.rs";
token::SEMI. {
let hi = p.get_hi_pos();
p.bump();
ret spanned(lo, hi, ast::cdir_src_mod(id, file_opt, outer_attrs));
}
// mod x = "foo_dir" { ...directives... }
token::LBRACE. {
p.bump();