about summary refs log tree commit diff
path: root/src/libsyntax/ext/source_util.rs
AgeCommit message (Collapse)AuthorLines
2014-02-18Avoid returning original macro if expansion fails.Douglas Young-6/+6
Closes #11692. Instead of returning the original expression, a dummy expression (with identical span) is returned. This prevents infinite loops of failed expansions as well as odd double error messages in certain situations.
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-6/+2
2014-02-03syntax: Remove io_error usageAlex Crichton-5/+4
2014-02-02syntax: convert LitBinary from @[u8] to Rc<~[u8]>.Huon Wilson-4/+2
2014-02-02librustc: Fix merge fallout.Patrick Walton-1/+6
2014-02-02libsyntax: De-`@str` pathnamesPatrick Walton-1/+1
2014-02-02librustc: Stop using `@str` for source.Patrick Walton-2/+2
2014-02-02libsyntax: De-`@str` literal strings in the ASTPatrick Walton-6/+7
2014-01-21[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old ↵Simon Sapin-1/+1
from_utf8_owned() behavior
2014-01-18syntax::ext: replace span_fatal with span_err in many places.Huon Wilson-8/+18
This means that compilation continues for longer, and so we can see more errors per compile. This is mildly more user-friendly because it stops users having to run rustc n times to see n macro errors: just run it once to see all of them.
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-9/+9
2014-01-08Fix CodeMap issue in expand_include_str()Michael Woerister-13/+6
2014-01-04etc: licenseck: don't hardcode a specific yearAdrien Tétar-2/+2
2014-01-03libsyntax: De-`@mut` `CodeMap::files`Patrick Walton-1/+2
2014-01-03libsyntax: De-`@mut` `FileMap::multibyte_chars`Patrick Walton-1/+1
2014-01-03libsyntax: De-`@mut` `FileMap::lines`Patrick Walton-1/+2
2014-01-02libsyntax: Make the parser mutablePatrick Walton-3/+7
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-9/+9
2013-12-28Stop using @ExtCtxtSteven Fackler-9/+9
2013-12-10Fix missing code map entry for uses of `include_str!`.Jack Moffitt-1/+15
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-4/+4
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-4/+4
2013-11-28Register new snapshotsAlex Crichton-3/+3
2013-11-11Move std::rt::io to std::ioAlex Crichton-2/+2
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-4/+3
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-17/+8
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-10-28Remove the extension traits for Readers/WritersAlex Crichton-1/+1
These methods are all excellent candidates for default methods, so there's no need to require extra imports of various traits.
2013-10-24Test fixes and merge conflictsAlex Crichton-0/+1
2013-10-24Remove io::read_errorAlex Crichton-5/+3
The general idea is to remove conditions completely from I/O, so in the meantime remove the read_error condition to mean the same thing as the io_error condition.
2013-10-24Remove even more of std::ioAlex Crichton-16/+35
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-18Optimize include_bin! for large inputsAlex Crichton-8/+11
Previously an ExprLit was created *per byte* causing a huge increase in memory bloat. This adds a new `lit_binary` to contain a literal of binary data, which is currently only used by the include_bin! syntax extension. This massively speeds up compilation times of the shootout-k-nucleotide-pipes test before: time: 469s memory: 6GB assertion failure in LLVM (section too large) after: time: 2.50s memory: 124MB Closes #2598
2013-10-16path2: Update based on more review feedbackKevin Ballard-1/+1
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-4/+4
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-7/+9
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-1/+1
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-10/+10
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-1/+1
cc #5898
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-3/+3
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-1/+1
2013-07-05Do not rely on newtype enum dereferenceSeo Sanghyeon-5/+5
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-4/+1
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-25great renaming propagation: syntaxCorey Richardson-5/+3
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-9/+9
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-06-10std: remove str::{connect,concat}*.Huon Wilson-3/+1
2013-06-06Clean up a handful of build warnings.Michael Sullivan-1/+1
2013-06-05just use TLS internerJohn Clements-1/+2
2013-05-30Remove copy bindings from patterns.Niko Matsakis-2/+2
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+5
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-22syntax/ext: convert all AstBuilder methods to a uniform syntax.Huon Wilson-8/+8