about summary refs log tree commit diff
path: root/src/libsyntax/syntax.rs
AgeCommit message (Collapse)AuthorLines
2013-11-03Rename files to match current recommendations.Chris Morgan-87/+0
New standards have arisen in recent months, mostly for the use of rustpkg, but the main Rust codebase has not been altered to match these new specifications. This changeset rectifies most of these issues. - Renamed the crate source files `src/libX/X.rs` to `lib.rs`, for consistency with current styles; this affects extra, rustc, rustdoc, rustpkg, rustuv, std, syntax. - Renamed `X/X.rs` to `X/mod.rs,` as is now recommended style, for `std::num` and `std::terminfo`. - Shifted `src/libstd/str/ascii.rs` out of the otherwise unused `str` directory, to be consistent with its import path of `std::ascii`; libstd is flat at present so it's more appropriate thus. While this removes some `#[path = "..."]` directives, it does not remove all of them, and leaves certain other inconsistencies, such as `std::u8` et al. which are actually stored in `src/libstd/num/` (one subdirectory down). No quorum has been reached on this issue, so I felt it best to leave them all alone at present. #9208 deals with the possibility of making libstd more hierarchical (such as changing the crate to match the current filesystem structure, which would make the module path `std::num::u8`). There is one thing remaining in which this repository is not rustpkg-compliant: rustpkg would have `src/std/` et al. rather than `src/libstd/` et al. I have not endeavoured to change that at this point as it would guarantee prompt bitrot and confusion. A change of that magnitude needs to be discussed first.
2013-10-31Implement a concat!() format extensionAlex Crichton-0/+1
This extension can be used to concatenate string literals at compile time. C has this useful ability when placing string literals lexically next to one another, but this needs to be handled at the syntax extension level to recursively expand macros. The major use case for this is something like: macro_rules! mylog( ($fmt:expr $($arg:tt)*) => { error2!(concat!(file!(), ":", line!(), " - ", $fmt) $($arg)*); }) Where the mylog macro will automatically prepend the filename/line number to the beginning of every log message.
2013-10-23register snapshotsDaniel Micay-1/+1
2013-10-05Implement feature-gating for the compilerAlex Crichton-0/+2
A few features are now hidden behind various #[feature(...)] directives. These include struct-like enum variants, glob imports, and macro_rules! invocations. Closes #9304 Closes #9305 Closes #9306 Closes #9331
2013-09-26Update version numbers to 0.9-preBrian Anderson-1/+1
2013-09-21Update version numbers to 0.8Brian Anderson-1/+1
2013-09-15Reduce the amount of complexity in format!Alex Crichton-1/+1
This renames the syntax-extension file to format from ifmt, and it also reduces the amount of complexity inside by defining all other macros in terms of format_args!
2013-09-10Remove oldvisit.rs (yay!); part of #7081 refactoring.Felix S. Klock II-1/+0
2013-08-07Add initial support for a new formatting syntaxAlex Crichton-0/+1
The new macro is available under the name ifmt! (only an intermediate name)
2013-08-02librustc: Introduce a new visitor type based on traits and port syntax to it.Patrick Walton-0/+1
This is preparation for removing `@fn`. This does *not* use default methods yet, because I don't know whether they work. If they do, a forthcoming PR will use them. This also changes the precedence of `as`.
2013-08-02auto merge of #8188 : huonw/rust/cfg-macro, r=pcwaltonbors-0/+1
Example: if cfg!(test) { calculation_to_run_only_when_testing(); } Closes #8130.
2013-08-01Remove the pipes compilerBrian Anderson-2/+0
The pipes compiler produced data types that encoded efficient and safe bounded message passing protocols between two endpoints. It was also capable of producing unbounded protocols. It was useful research but was arguably done before its proper time. I am removing it for the following reasons: * In practice we used it only for producing the `oneshot` and `stream` unbounded protocols and all communication in Rust use those. * The interface between the proto! macro and the standard library has a large surface area and was difficult to maintain through language and library changes. * It is now written in an old dialect of Rust and generates code which would likely be considered non-idiomatic. * Both the compiler and the runtime are difficult to understand, and likewise the relationship between the generated code and the library is hard to understand. Debugging is difficult. * The new scheduler implements `stream` and `oneshot` by hand in a way that will be significantly easier to maintain. This shouldn't be taken as an indication that 'channel protocols' for Rust are not worth pursuing again in the future.
2013-08-01syntax: implement cfg!() which evaluates to true/false where #[cfg] would ↵Huon Wilson-0/+1
keep/remove. Example: if cfg!(test) { calculation_to_run_only_when_testing(); }
2013-07-27Remove unnecessary #[path = "***/mod.rs"] lines.OGINO Masanori-3/+0
Fixes #7922. Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-20rm obsolete no-op lintsDaniel Micay-2/+0
2013-07-14Allow non-uppercase-statics by defaultAlex Crichton-2/+0
I think of this as a stylistic opinion which shouldn't necessarily be enforced by default on all users of rust, but that's just my opinion.
2013-07-08Bump version numbers to 0.8-preBrian Anderson-1/+1
2013-07-01rustc: add a lint to enforce uppercase statics.Huon Wilson-0/+1
2013-06-30Bump version from 0.7-pre to 0.7Brian Anderson-1/+1
2013-06-25great renaming propagation: syntaxCorey Richardson-10/+1
2013-06-25Rename all files with the 'rc' extensionAlex Crichton-0/+99