about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-02-19auto merge of #4999 : erickt/rust/incoming, r=brsonbors-333/+369
This patch series is doing a couple things with the ultimate goal of removing `#[allow(vecs_implicitly_copyable)]`, although I'm not quite there yet. The main change is passing around `@~str`s in most places, and using `ref`s in others. As far as I could tell, there are no performance changes with these patches, and all the tests pass on my mac.
2013-02-19convert SyntaxExtensions's key to a @~strErick Tryzelaar-31/+31
2013-02-19convert ast::meta_items to take @~strsErick Tryzelaar-33/+34
2013-02-19convert syntax::attr to use @~strsErick Tryzelaar-88/+84
2013-02-19Alias HashMap<~str, SyntaxExtension> to SyntaxExtensionsErick Tryzelaar-6/+8
2013-02-19libsyntax and librustc: minor cleanupErick Tryzelaar-7/+5
2013-02-19libsyntax: change attr:get_attr_name to take a refErick Tryzelaar-9/+8
2013-02-19libsyntax: make enum variants take refsErick Tryzelaar-104/+150
2013-02-19syntax: fix the indentation of a functionErick Tryzelaar-36/+36
2013-02-19Change functions from taking ~str to taking &strErick Tryzelaar-3/+3
2013-02-19libsyntax: convert interner into a modern structErick Tryzelaar-42/+36
2013-02-19auto merge of #5002 : catamorphism/rust/one-tuples, r=graydonbors-8/+37
r? @graydon - This is for greater uniformity (for example, macros that generate tuples). rustc already supported 1-tuple patterns, but there was no way to construct a 1-tuple term. @graydon , as far as your comment on #4898 - it did turn out to be solvable inside the macro (since @luqmana already fixed it using structs instead), but I still think it's a good idea to allow 1-tuples, for uniformity. I don't think anyone is likely to trip over it, and I'm not too worried that it changes the amount of ambiguity.
2013-02-18auto merge of #5005 : alexcrichton/rust/bitv++, r=catamorphismbors-4/+8
These commits take the old bitv implementation and modernize it with an explicit self, some minor touchups, and using what I think is some more recent patterns (like `::new` instead of `Type()`). Additionally, this adds an implementation of `container::Set` on top of a bit vector to have as a set of `uint`s. I initially tried to parameterize the type for the set to be `T: NumCast` but I was hitting build problems in stage0 which I think means that it's not in a snapshot yet, so it's just hardcoded as a set of `uint`s now. In the future perhaps it could be parameterized. I'm not sure if it would really add anything, though, so maybe it's nicer to be hardcoded anyway. I also added some extra methods to do normal bit vector operations on the set in-place, but these aren't a part of the `Set` trait right now. I haven't benchmarked any of these operations just yet, but I imagine that there's quite a lot of room for optimization here and there.
2013-02-18auto merge of #5004 : luqmana/rust/rename-use-import, r=catamorphismbors-14/+14
Seems like my previous pull request got lost along the way somehow. So here it is updated.
2013-02-18rustc: For one-tuples, make parsing and printing the type workTim Chevalier-2/+14
and add a test to reflect-visit-data
2013-02-17Modernize bitv mut fields and explicit selfAlex Crichton-4/+8
2013-02-17libsyntax: Update view_item_use/import to reflect actual usageLuqman Aden-14/+14
2013-02-17syntax: Allow 1-tuple expressionsTim Chevalier-6/+23
This is for greater uniformity (for example, macros that generate tuples). rustc already supported 1-tuple patterns, but there was no way to construct a 1-tuple term.
2013-02-17libsyntax: Long lines.Luqman Aden-6/+12
2013-02-17libsyntax: Explicit-self-ify pipes compiler.Luqman Aden-122/+110
2013-02-17libsyntax: Remove last use of structural records in pipes compiler.Luqman Aden-56/+69
2013-02-16auto merge of #4978 : z0w0/rust/issue-607, r=graydonbors-10/+20
2013-02-17syntax: Implement recursive sorting of meta items. Closes #607Zack Corr-10/+20
2013-02-16Parse (and discard) lifetime declarations on function typesNiko Matsakis-17/+29
2013-02-16Permit lifetimes to appear in type parameter lists and after `&`. Lifetimes inNiko Matsakis-11/+105
type parameter lists are currently ignored, but `&'a T` is equivalent to `&a/T`.
2013-02-15librustc: Stop parsing `impl Type : Trait` and fix several declarations that ↵Patrick Walton-66/+67
slipped through. r=tjc
2013-02-15auto merge of #4969 : nickdesaulniers/rust/issue3869, r=brsonbors-1/+1
Issue #3869 review? @nikomatsakis Convert all uses of vec::slice to vec::view Issue #3869 Rename const_view to const_slice Renamed mut_view to mut_slice Fix windows build error. `buf` is borrowed by the call to `as_mut_buf()` and so we must invoke `slice()` outside of that call.
2013-02-15libsyntax: Remove move as a keyword.Luqman Aden-2/+2
2013-02-15libsyntax: Get rid of uses of `move` and don't parse it.Luqman Aden-130/+123
2013-02-14auto merge of #4941 : nickdesaulniers/rust/issue4524cleanup, r=catamorphismbors-9/+0
review? @brson Issue #4524
2013-02-14remove die definition and use in doc testsNick Desaulniers-9/+0
2013-02-14auto merge of #4927 : sanxiyn/rust/remove-dvec, r=catamorphismbors-10/+7
2013-02-14auto merge of #4911 : lifthrasiir/rust/comment-exemptions, r=catamorphismbors-39/+64
This is a natural extension of #4887, and handles the following three cases: ~~~~ a line with only /s //////////////////////////////////////////// a line with only /s followed by whitespace //////////////////////////////////////////// a block comment with only *s between two /s /********************************/ ~~~~
2013-02-14Convert all uses of vec::slice to vec::view Issue #3869Nick Desaulniers-1/+1
Rename const_view to const_slice Renamed mut_view to mut_slice
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-26/+26
rs=implflipping
2013-02-14Remove DVec from syntax::parseSeo Sanghyeon-10/+7
2013-02-13auto merge of #4922 : jbclements/rust/add-deriving-eq-to-asts, r=catamorphismbors-544/+236
r? Apply deriving_eq to the data structures in ast.rs, and get rid of the custom definitions of eq that were everywhere. resulting ast.rs is about 400 lines shorter. Also: add a few test cases and a bunch of comments. Also: change ast_ty_to_ty_cache to use node ids rather than ast::ty's. I believe this was a suggestion related to my changes, and it appears to pass all tests. Also: tiny doc fix, remove references to crate keywords.
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-47/+47
2013-02-13cleanup, fix test caseJohn Clements-4/+12
2013-02-13libsyntax: Pretty print using the new impl syntax. r=brsonPatrick Walton-2/+4
2013-02-13add test caseJohn Clements-1/+30
2013-02-13deriving_eq for tokens and binopsJohn Clements-6/+1
Note that the replaced definition of equality on tokens contains a *huge* shortcut on INTERPOLATED tokens (those that contain ASTs), whereby any two INTERPOLATED tokens are considered equal. This seems like a really broken notion of equality, but it appears that the existing test cases and the compiler don't depend on it. Niko noticed this, BTW. Replace long definition of Eq on tokens and binops w
2013-02-13finish deriving_eq in astJohn Clements-11/+2
2013-02-13deriving-eq all over astJohn Clements-502/+81
2013-02-13@mut fixJohn Clements-3/+3
2013-02-13Commenting, test cases, cleanupJohn Clements-28/+118
2013-02-13auto merge of #4840 : jbclements/rust/add-json-enum-encoding, r=catamorphismbors-11/+162
r? I added code to the JSON encoder to support the serialization of enums. Before this, the JSON serializer only handled Option, and encoded None as 'null'. Following this change, all enums are encoded as arrays containing the enum name followed by the encoded fields. This appears consistent with the unstated invariant that the resulting output can be mapped back to the input *if* there's a decoder around that knows the types that were in existence when the serialization occurred. Also, added test cases.
2013-02-13retabbingJohn Clements-59/+60
2013-02-13libsyntax: don't parse ////, /***/ as doc commentsKang Seonghoon-39/+64
2013-02-12added rather elaborate test frameworkJohn Clements-17/+126