about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
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
2013-02-11Fix license blockBrian Anderson-2/+2
2013-02-11Update copyright yearsMikko Perttunen-1/+1
2013-02-11Use topmost span for macro expansion location. Fixes behaviour of file!, ↵Mikko Perttunen-7/+28
line! and col!
2013-02-09auto merge of #4861 : sethpink/rust/incoming, r=catamorphismbors-52/+24
Fix for issue #4830.
2013-02-09auto merge of #4854 : thestinger/rust/oldmap, r=catamorphismbors-14/+12
2013-02-09tidyJohn Clements-5/+7
2013-02-09fix typos in sample code, add enum to json encoder, add test caseJohn Clements-11/+50
2013-02-09Issue #4830 fixSeth Pink-52/+24
2013-02-08libsyntax/attr.rs: switch from oldmap to LinearSetDaniel Micay-5/+3
2013-02-08oldmap: get rid of legacy _ref suffixesDaniel Micay-10/+10
2013-02-09Added related FIXME for 3260Matthijs Hofstra-1/+1
2013-02-09Fix for issue 2174Matthijs Hofstra-4/+16
The function that formats and prints the squigly line that hilights errors counted tabs as spaces, which resulted in incorrect error messages when tabs were used for indentation. This change compares the highlight line with the previous line and inserts a tab instead of a space whenever such a tab exists on the previous line. Note that error messages will still highlight incorrectly when the previous line include characters that require more than one utf8 code point, as mentioned in issue 3260.
2013-02-08Add and lex LIFETIME tokensNiko Matsakis-22/+90
cc #4846
2013-02-07librustc: Lots of de-muting. rs=demutingPatrick Walton-567/+596
2013-02-07auto merge of #4791 : jbclements/rust/demodeing-and-deGCing, r=jbclements,brsonbors-67/+70
r? It looks to me like the string_reader and tt_reader structs are GC pointers only because they predate the modern borrow system. This commit leaves the type names string_reader and tt_reader alone (they still refer to GC-ed pointers), but internally the functions now use borrowed pointers to refer to these structures. My guess would be that it's possible to move this change outward and not use the GCed pointers at all, but that change looks like it could be a larger one. Actually, I'm delighted at how quick this change was.
2013-02-07Make ~fn non-copyable, make &fn copyable, split barefn/closure types,Niko Matsakis-170/+243
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-02-06libsyntax: no binary/hex float literalsKang Seonghoon-0/+7
2013-02-05oldmap: use &K instead of K in find and getPatrick Walton-10/+10
This reverts commit a4250a96fdf61142a9c8dbb6d37ae8435c99e396. This is not the cause of the nonexhaustive-match failure.
2013-02-05Revert "oldmap: use &K instead of K in find and get"Graydon Hoare-10/+10
This reverts commit 8e643525d4e5bca993dada43615916c382a0645b.
2013-02-05Merge branch 'incoming' into removingTim Chevalier-10/+10
2013-02-04lines too longJohn Clements-11/+12
2013-02-04demodeing, un-gc-ingJohn Clements-70/+72
It looks to me like the string_reader and tt_reader structs are GC pointers only because they predate the modern borrow system. This commit leaves the type names string_reader and tt_reader alone (they still refer to GC-ed pointers), but internally the functions now use borrowed pointers to refer to these structures. My guess would be that it's possible to move this change outward and not use the GCed pointers at all, but that change looks like it could be a larger one. Actually, I'm delighted at how quick this change was.
2013-02-04core/syntax: Staging fixesTim Chevalier-28/+0
2013-02-04auto merge of pull req #4777 from thestinger/rust, r=graydonbors-10/+10
2013-02-04syntax: Make the pipe compiler stop generating set_buffer_ callsTim Chevalier-2/+2
2013-02-04core/syntax: Add transitional code for pipesTim Chevalier-0/+28
2013-02-04Merge remote-tracking branch 'bstrie/rimov' into incomingBrian Anderson-13/+13
Conflicts: src/libsyntax/parse/parser.rs src/test/bench/graph500-bfs.rs src/test/bench/sudoku.rs src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs src/test/run-pass/empty-mutable-vec.rs src/test/run-pass/foreach-nested.rs src/test/run-pass/swap-2.rs
2013-02-04Merge pull request #4684 from erickt/incomingBrian Anderson-12/+12
core: convert ToStr::to_str to take explicit &self
2013-02-04libsyntax: Add explicit self to ast_util. rs=explicit-selfingPatrick Walton-22/+22
2013-02-03core: convert ToStr::to_str to take explicit &selfErick Tryzelaar-12/+12
2013-02-03oldmap: use &K instead of K in find and getDaniel Micay-10/+10
2013-02-03Merge remote-tracking branch 'thestinger/old_map' into incomingBrian Anderson-29/+29
Conflicts: src/test/bench/core-map.rs
2013-02-03Converted libcore/uint-template.rs to the new string functions.Marvin Löbel-7/+7
- Moved ToStr implementation of unsigned integers to uint-template.rs. - Marked the `str()` function as deprecated. - Forwarded all conversion functions to `core::num::to_str_common()` and `core::num::from_str_common()`. - Fixed most places in the codebase where `to_str()` is being used. - Added uint-template to_str and from_str overflow tests.
2013-02-03oldmap: get rid of the legacy each_key methodDaniel Micay-3/+3
2013-02-03oldmap: get rid of the legacy contains_key methodDaniel Micay-3/+3