about summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2013-02-13cleanup, fix test caseJohn Clements-1/+1
2013-02-13@mut fixJohn Clements-3/+3
2013-02-13Commenting, test cases, cleanupJohn Clements-8/+10
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-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-09tidyJohn Clements-5/+7
2013-02-09fix typos in sample code, add enum to json encoder, add test caseJohn Clements-11/+50
2013-02-08oldmap: get rid of legacy _ref suffixesDaniel Micay-1/+1
2013-02-07librustc: Lots of de-muting. rs=demutingPatrick Walton-123/+140
2013-02-07auto merge of #4791 : jbclements/rust/demodeing-and-deGCing, r=jbclements,brsonbors-23/+25
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-2/+2
correct handling of moves for struct-record update. Part of #3678. Fixes #2828, #3904, #4719.
2013-02-05oldmap: use &K instead of K in find and getPatrick Walton-7/+7
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-7/+7
This reverts commit 8e643525d4e5bca993dada43615916c382a0645b.
2013-02-05Merge branch 'incoming' into removingTim Chevalier-7/+7
2013-02-04lines too longJohn Clements-11/+12
2013-02-04demodeing, un-gc-ingJohn Clements-26/+27
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-7/+7
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-03core: convert ToStr::to_str to take explicit &selfErick Tryzelaar-2/+2
2013-02-03oldmap: use &K instead of K in find and getDaniel Micay-7/+7
2013-02-03oldmap: get rid of the legacy contains_key methodDaniel Micay-1/+1
2013-02-03rename map -> oldmap and mark it as deprecatedDaniel Micay-10/+10
LinearMap is quite a bit faster, and is fully owned/sendable without requiring copies. The older std::map also doesn't use explicit self and relies on mutable fields.
2013-02-01Merge remote-tracking branch 'nickdesaulniers/issue4524' into nocomm1Brian Anderson-28/+42
2013-02-01Remove fail keyword from lexer & parser and clean up remaining calls toNick Desaulniers-28/+42
fail Fix merge conflicts - Issue 4524
2013-01-31test cases, cleanupJohn Clements-46/+46
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-15/+15
2013-01-31Finalize moves-based-on-type implementation.Niko Matsakis-20/+8
Changes: - Refactor move mode computation - Removes move mode arguments, unary move, capture clauses (though they still parse for backwards compatibility) - Simplify how moves are handled in trans - Fix a number of illegal copies that cropped up - Workaround for bug involving def-ids in params (see details below) Future work (I'll open bugs for these...): - Improve error messages for moves that are due to bindings - Add support for moving owned content like a.b.c to borrow check, test in trans (but I think it'll "just work") - Proper fix for def-ids in params Def ids in params: Move captures into a map instead of recomputing. This is a workaround for a larger bug having to do with the def-ids associated with ty_params, which are not always properly preserved when inlining. I am not sure of my preferred fix for the larger bug yet. This current fix removes the only code in trans that I know of which relies on ty_param def-ids, but feels fragile.
2013-01-29De-capitalize "note" to get rid of spurious tidy warningsTim Chevalier-1/+1
2013-01-29libsyntax: De-export libsyntax. rs=deexportingPatrick Walton-231/+229
2013-01-29libsyntax: De-export a lot of libsyntax. rs=deëxportingPatrick Walton-42/+40
2013-01-29librustc: Disallow trait bounds in types, enumerations, and structure ↵Patrick Walton-4/+11
definitions. r=tjc
2013-01-29libstd: Remove "dual impls" from the language and enforce coherence rules. ↵Patrick Walton-6/+8
r=brson "Dual impls" are impls that are both type implementations and trait implementations. They can lead to ambiguity and so this patch removes them from the language. This also enforces coherence rules. Without this patch, records can implement traits not defined in the current crate. This patch fixes this, and updates all of rustc to adhere to the new enforcement. Most of this patch is fixing rustc to obey the coherence rules, which involves converting a bunch of records to structs.
2013-01-28Link the lifetimes of regions resulting from borrows of theNiko Matsakis-3/+10
contents of other borrowed pointers to the lifetimes of the borrowed value. Fixes #3148. r=catamorphism
2013-01-24Convert pipes::Buffer into a structErick Tryzelaar-4/+4
2013-01-24Convert extfmt::rt::Conv into a structErick Tryzelaar-11/+25
2013-01-24remove support for records from auto_encodeErick Tryzelaar-182/+75
2013-01-23libsyntax: Implement `assert` as a macro (called `fail_unless!` on a ↵Patrick Walton-0/+8
transitionary basis to avoid conflicting with the keyword right now). r=brson
2013-01-23Long linesTim Chevalier-1/+2
2013-01-23renaming to adhere to conventionsJohn Clements-108/+102
2013-01-22Add is_mutbl field to argSeo Sanghyeon-0/+5
2013-01-20Convert many libsyntax records into structsErick Tryzelaar-26/+50
Specifically: ast_map::ctx ast_util::id_range diagnostic::{handler_t,codemap_t} auto_encode::field ext::base::{macro_def,syntax_expander_tt,syntax_expander_tt_item} ext::pipes::proto::next_state
2013-01-20convert the remaining ast record types into structsErick Tryzelaar-42/+57
These are: region,arg,fn_decl,method,_mod,foreign_mod, variant_arg,enum_def_,variant_,trait_ref.
2013-01-20convert ast::{ty_field_,ty_method} into a structErick Tryzelaar-1/+1
2013-01-20convert ast::ty into a structErick Tryzelaar-35/+56