This commit allows patterns like:
alt x { some(_) { ... } none { } }
without the '.' after none. The parser suspends judgment about
whether a bare ident is a tag or a new bound variable; instead,
the resolver disambiguates.
This means that any code after resolution that pattern-matches on
patterns needs to call pat_util::normalize_pat, which consults
an environment to do this disambiguation.
In addition, local variables are no longer allowed to shadow
tag names, so this required changing some code (e.g. renaming
variables named "mut", and renaming ast::sub to subtract).
The parser currently accepts patterns with and without the '.'.
Once the compiler and libraries are changed, it will no longer
accept the '.'.
|
||
|---|---|---|
| .. | ||
| cargo | ||
| comp | ||
| compiletest | ||
| etc | ||
| fuzzer | ||
| libcore | ||
| libstd | ||
| libuv@f1859eb841 | ||
| llvm@d578b905de | ||
| rt | ||
| rustdoc | ||
| rustllvm | ||
| test | ||
| README | ||
| snapshots.txt | ||
This is preliminary version of the Rust compiler.
Source layout:
comp/ The self-hosted compiler
cargo/ The package manager
libcore/ The core library (imported and linked by default)
libstd/ The standard library (slightly more peripheral code)
rustllvm/ LLVM support code
rt/ The runtime system
rt/rust_*.cpp - The majority of the runtime services
rt/isaac - The PRNG used for pseudo-random choices in the runtime
rt/bigint - The bigint library used for the 'big' type
rt/uthash - Small hashtable-and-list library for C, used in runtime
rt/libuv - The library used for async IO in the runtime
rt/{sync,util} - Small utility classes for the runtime.
test/ Testsuite
test/compile-fail - Tests that should fail to compile
test/run-fail - Tests that should compile, run and fail
test/run-pass - Tests that should compile, run and succeed
test/bench - Benchmarks and miscellanea
Please be gentle, it's a work in progress.