about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
AgeCommit message (Collapse)AuthorLines
2014-12-30Fallout from stabilizationAaron Turon-2/+3
2014-12-21Fallout of std::str stabilizationAlex Crichton-19/+18
2014-12-21rollup merge of #19972: alexcrichton/snapshotsAlex Crichton-24/+0
Conflicts: src/libcollections/string.rs src/libcollections/vec.rs src/snapshots.txt
2014-12-21Remove a ton of public reexportsCorey Farwell-1/+1
Remove most of the public reexports mentioned in #19253 These are all leftovers from the enum namespacing transition In particular: * src/libstd/num/strconv.rs * ExponentFormat * SignificantDigits * SignFormat * src/libstd/path/windows.rs * PathPrefix * src/libstd/sys/windows/timer.rs * Req * src/libcollections/str.rs * MaybeOwned * src/libstd/collections/hash/map.rs * Entry * src/libstd/collections/hash/table.rs * BucketState * src/libstd/dynamic_lib.rs * Rtld * src/libstd/io/net/ip.rs * IpAddr * src/libstd/os.rs * MemoryMapKind * MapOption * MapError * src/libstd/sys/common/net.rs * SocketStatus * InAddr * src/libstd/sys/unix/timer.rs * Req [breaking-change]
2014-12-19Register new snapshotsAlex Crichton-24/+0
This does not yet start the movement to rustc-serialize. That detail is left to a future PR.
2014-12-13libsyntax: convert `LockstepIterSize` binops to by valueJorge Aparicio-0/+24
2014-11-26Rote changes due to the fact that ast paths no longer carry this extraneous ↵Niko Matsakis-2/+2
bounds.
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+4
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-16fallout from deprecating find_copy and get_copyAlexis Beingessner-1/+1
2014-11-07Add `ast::SequenceRepetition`Piotr Czarnecki-50/+78
2014-11-05Workaround to have doc comments desugared only in macrosPiotr Czarnecki-7/+18
2014-11-05Remove `Matcher`sPiotr Czarnecki-17/+19
2014-11-05Use `TokenTree`s in lhs of macrosPiotr Czarnecki-199/+266
2014-10-30rollup merge of #18445 : alexcrichton/index-mutAlex Crichton-6/+4
Conflicts: src/libcollections/vec.rs
2014-10-30collections: Enable IndexMut for some collectionsAlex Crichton-6/+4
This commit enables implementations of IndexMut for a number of collections, including Vec, RingBuf, SmallIntMap, TrieMap, TreeMap, and HashMap. At the same time this deprecates the `get_mut` methods on vectors in favor of using the indexing notation. cc #18424
2014-10-30Use common variants for open and close delimitersBrendan Zabarauskas-16/+9
This common representation for delimeters should make pattern matching easier. Having a separate `token::DelimToken` enum also allows us to enforce the invariant that the opening and closing delimiters must be the same in `ast::TtDelimited`, removing the need to ensure matched delimiters when working with token trees.
2014-10-29Rename fail! to panic!Steve Klabnik-3/+3
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-28Move token-to-string functions into print::pprustBrendan Zabarauskas-2/+3
2014-10-28Use PascalCase for token variantsBrendan Zabarauskas-22/+23
2014-10-26Add a KleeneOp enum for clarityBrendan Zabarauskas-7/+8
2014-10-26Reduce the size of the TokenTreeBrendan Zabarauskas-5/+13
2014-10-26Use standard capitalisation for TokenTree variantsBrendan Zabarauskas-14/+14
2014-10-26Prevent some vector reallocationsBrendan Zabarauskas-6/+6
2014-10-26Rename TokenTree variants for clarityBrendan Zabarauskas-12/+12
This should be clearer, and fits in better with the `TTNonterminal` variant. Renames: - `TTTok` -> `TTToken` - `TTDelim` -> `TTDelimited` - `TTSeq` -> `TTSequence`
2014-10-26Add Span and separate open/close delims to TTDelimBrendan Zabarauskas-37/+37
This came up when working [on the gl-rs generator extension](https://github.com/bjz/gl-rs/blob/990383de801bd2e233159d5be07c9b5622827620/src/gl_generator/lib.rs#L135-L146). The new definition of `TTDelim` adds an associated `Span` that covers the whole token tree and enforces the invariant that a delimited sequence of token trees must have an opening and closing delimiter. A `get_span` method has also been added to `TokenTree` type to make it easier to implement better error messages for syntax extensions.
2014-10-24Add a lint for not using field pattern shorthandsP1start-1/+1
Closes #17792.
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-8/+8
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-07Fix the most egregious instances of "local ambiguity: multiple parsing ↵Vadim Chugunov-1/+10
options..." error in macros, which often occurs when trying to match parts of Rust syntax. For example, this matcher: `fn $name:ident( $($param:ident : $pty:ty),* )` would fail when parsing `fn foo()`, because macro parser wouldn't realize that an ident cannot start with `)`. This resolves #5902, and at least partially mitigates #9364 and #3232.
2014-09-17librustc: Implement associated types behind a feature gate.Patrick Walton-1/+4
The implementation essentially desugars during type collection and AST type conversion time into the parameter scheme we have now. Only fully qualified names--e.g. `<T as Foo>::Bar`--are supported.
2014-09-16Fallout from renamingAaron Turon-7/+7
2014-09-14syntax: fix fallout from using ptr::P.Eduard Burtescu-17/+17
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-20/+19
2014-07-21Add a ton of ignore-lexer-testCorey Richardson-0/+2
2014-07-13add make_method method to MacResult traitJohn Clements-1/+18
this allows macro results to be parsed as methods
2014-07-11rename one of the two confusing MacroExpandersJohn Clements-2/+2
There were two things named MacroExpander, which was confusing. I renamed one of them TTMacroExpander. [breaking change]
2014-07-09syntax: doc comments all the thingsCorey Richardson-99/+96
2014-07-08macro literals should be compared by name onlyJohn Clements-2/+1
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-5/+5
[breaking-change]
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-0/+1
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-13syntax: parse outer attributes in `quote_item!` calls.Huon Wilson-2/+1
Fixes #14857.
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-2/+4
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11syntax: Move the AST from @T to Gc<T>Alex Crichton-5/+6
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-06-06auto merge of #14667 : aochagavia/rust/pr2, r=huonwbors-1/+1
2014-06-06Change to_str().to_string() to just to_str()Adolfo Ochagavía-1/+1
2014-06-05Fallout from the libcollections movementAlex Crichton-2/+2
2014-05-30libsyntax: Fix snake_case errors.Kevin Butler-3/+3
A number of functions/methods have been moved or renamed to align better with rust standard conventions. syntax::ext::mtwt::xorPush => xor_push syntax::parse::parser::Parser => Parser::new [breaking-change]
2014-05-28Add patterns to MacResultKeegan McAllister-0/+5
2014-05-27std: Rename strbuf operations to stringRicho Healey-8/+8
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-4/+4
[breaking-change]