about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
AgeCommit message (Collapse)AuthorLines
2014-05-08libsyntax: Remove uses of `~str` from libsyntax, and fix falloutPatrick Walton-35/+35
2014-05-02Replace most ~exprs with 'box'. #11779Brian Anderson-2/+2
2014-04-27Fix repeated module documentationAlexandre Gagnon-5/+0
2014-04-21auto merge of #13435 : edwardw/rust/span, r=brsonbors-1/+1
When reporting "consider removing this semicolon" hint message, the offending semicolon may come from macro call site instead of macro itself. Using the more appropriate span makes the hint more helpful. Closes #13428.
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-15/+15
2014-04-18Use more precise span when reporting semicolon hintEdward Wang-1/+1
When reporting "consider removing this semicolon" hint message, the offending semicolon may come from macro call site instead of macro itself. Using the more appropriate span makes the hint more helpful. Closes #13428.
2014-04-10Renamed ast::Purity to ast::FnStyle and ast::ImpureFn to ast::NormalFn and ↵Kasey Carrothers-1/+1
updated associated variable and function names.
2014-04-06De-~[] Reader and WriterSteven Fackler-3/+4
There's a little more allocation here and there now since from_utf8_owned can't be used with Vec.
2014-04-03syntax: Remove AbiSet, use one AbiAlex Crichton-1/+1
This change removes the AbiSet from the AST, converting all usage to have just one Abi value. The current scheme selects a relevant ABI given a list of ABIs based on the target architecture and how relevant each ABI is to that architecture. Instead of this mildly complicated scheme, only one ABI will be allowed in abi strings, and pseudo-abis will be created for special cases as necessary. For example the "system" abi exists for stdcall on win32 and C on win64. Closes #10049
2014-03-31syntax: Switch field privacy as necessaryAlex Crichton-1/+1
2014-03-29auto merge of #13188 : FlaPer87/rust/master, r=alexcrichtonbors-10/+0
2014-03-29Register new snapshotFlavio Percoco-10/+0
2014-03-28De-@ TokenTree.Eduard Burtescu-3/+3
2014-03-27serialize: use ResultSean McArthur-1/+10
All of Decoder and Encoder's methods now return a Result. Encodable.encode() and Decodable.decode() return a Result as well. fixes #12292
2014-03-22Migrate all users of opt_vec to owned_slice, delete opt_vec.Huon Wilson-11/+11
syntax::opt_vec is now entirely unused, and so can go.
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-2/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-2/+2
Closes #12771
2014-03-17Fix rustdoc and tests.Eduard Burtescu-1/+2
2014-03-17De-@ codemap and diagnostic.Eduard Burtescu-38/+28
2014-03-17De-@ ParseSess uses.Eduard Burtescu-39/+39
2014-03-12Changed lists of lifetimes in ast and ty to use Vec instead of OptVec.Felix S. Klock II-7/+7
There is a broader revision (that does this across the board) pending in #12675, but that is awaiting the arrival of more data (to decide whether to keep OptVec alive by using a non-Vec internally). For this code, the representation of lifetime lists needs to be the same in both ScopeChain and in the ast and ty structures. So it seemed cleanest to just use `vec_ng::Vec`, now that it has a cheaper empty representation than the current `vec` code.
2014-03-12alpha-rename .ident to .name in Lifetime, including in rustdoc.Felix S. Klock II-3/+3
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-4/+7
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-33/+33
2014-03-01auto merge of #12627 : alexcrichton/rust/issue-12623, r=brsonbors-2/+2
This helps prevent the unfortunate interleavings found in #12623.
2014-02-28std: Change assert_eq!() to use {} instead of {:?}Alex Crichton-6/+6
Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries.
2014-02-28syntax: Refactor diagnostics to focus on WritersAlex Crichton-2/+2
This commit alters the diagnostic emission machinery to be focused around a Writer for emitting errors. This allows it to not hard-code emission of errors to stderr (useful for other applications).
2014-02-24Move extra::json to libserializeAlex Crichton-3/+1
This also inverts the dependency between libserialize and libcollections. cc #8784
2014-02-20move extra::test to libtestLiigo Zhuang-3/+4
2014-02-19librustc: Remove unique vector patterns from the language.Patrick Walton-25/+33
Preparatory work for removing unique vectors from the language, which is itself preparatory work for dynamically sized types.
2014-02-07Removed @self and @Trait.Eduard Burtescu-5/+5
2014-02-06auto merge of #12048 : sanxiyn/rust/crate-config, r=alexcrichtonbors-3/+3
2014-02-05pull extra::{serialize, ebml} into a separate libserialize crateJeff Olson-1/+1
- `extra::json` didn't make the cut, because of `extra::json` required dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`, then `extra::json` could move into `serialize` - `libextra`, `libsyntax` and `librustc` depend on the newly created `libserialize` - The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap` and `TreeSet` for `Encodable`/`Decodable` were moved into the respective modules in `extra` - There is some trickery, evident in `src/libextra/lib.rs` where a stub of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for use in the stage0 build, where the snapshot rustc is still making deriving for `Encodable` and `Decodable` point at extra. Big props to @huonw for help working out the re-export solution for this extra: inline extra::serialize stub fix stuff clobbered in rebase + don't reexport serialize::serialize no more globs in libserialize syntax: fix import of libserialize traits librustc: fix bad imports in encoder/decoder add serialize dep to librustdoc fix failing run-pass tests w/ serialize dep adjust uuid dep more rebase de-clobbering for libserialize fixing tests, pushing libextra dep into cfg(test) fix doc code in extra::json adjust index.md links to serialize and uuid library
2014-02-06Avoid cloning ast::CrateConfigSeo Sanghyeon-3/+3
2014-02-03syntax: Remove io_error usageAlex Crichton-3/+2
2014-02-02libsyntax: Fix tests.Patrick Walton-12/+12
2014-02-02libsyntax: De-`@str` pathnamesPatrick Walton-16/+12
2014-02-02librustc: Stop using `@str` for source.Patrick Walton-47/+41
2014-01-23Redo exported macro serializationSteven Fackler-1/+1
The old method of serializing the AST gives totally bogus spans if the expansion of an imported macro causes compilation errors. The best solution seems to be to serialize the actual textual macro definition and load it the same way the std-macros are. I'm not totally confident that getting the source from the CodeMap will always do the right thing, but it seems to work in simple cases.
2014-01-21[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old ↵Simon Sapin-2/+2
from_utf8_owned() behavior
2014-01-17auto merge of #11598 : alexcrichton/rust/io-export, r=brsonbors-1/+1
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered) cc #11119
2014-01-17Tweak the interface of std::ioAlex Crichton-1/+1
* Reexport io::mem and io::buffered structs directly under io, make mem/buffered private modules * Remove with_mem_writer * Remove DEFAULT_CAPACITY and use DEFAULT_BUF_SIZE (in io::buffered)
2014-01-17rustc::driver: Capitalize structs and enumsklutzy-1/+1
driver::session::crate_metadata is unused; removed.
2014-01-15libsyntax: Remove the obsolete ability to parse from substrings.Patrick Walton-40/+1
This was used by the quasiquoter.
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-47/+46
2014-01-08Remove the io::Decorator traitAlex Crichton-2/+1
This is just an unnecessary trait that no one's ever going to parameterize over and it's more useful to just define the methods directly on the types themselves. The implementors of this type almost always don't want inner_mut_ref() but they're forced to define it as well.
2014-01-03librustc: De-`@mut` the span handlerPatrick Walton-3/+3
2014-01-03libsyntax: De-`@mut` `StringReader`, `TtReader`, and `reader`Patrick Walton-2/+2
2014-01-03librustc: De-`@mut` the parse sessionPatrick Walton-25/+25
2014-01-03libsyntax: De-`@mut` `ParseSess::included_mod_stack`Patrick Walton-3/+4