about summary refs log tree commit diff
path: root/src/libsyntax/parse/comments.rs
AgeCommit message (Collapse)AuthorLines
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-2/+1
2014-02-08syntax: convert the lexer to use Option<char> over transmute(-1).Huon Wilson-22/+22
The transmute was unsound. There are many instances of .unwrap_or('\x00') for "ignoring" EOF which either do not make the situation worse than it was (well, actually make it better, since it's easy to grep for places that don't handle EOF) or can never ever be read. Fixes #8971.
2014-02-07Removed @self and @Trait.Eduard Burtescu-18/+18
2014-02-03syntax: Remove io_error usageAlex Crichton-1/+2
2014-02-02libsyntax: De-`@str` pathnamesPatrick Walton-1/+1
2014-02-02librustc: Stop using `@str` for source.Patrick Walton-1/+1
2014-02-02libsyntax: De-`@str` literal strings in the ASTPatrick Walton-1/+0
2014-01-25Uppercase numeric constantsChris Wong-2/+2
The following are renamed: * `min_value` => `MIN` * `max_value` => `MAX` * `bits` => `BITS` * `bytes` => `BYTES` Fixes #10010.
2014-01-21[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old ↵Simon Sapin-1/+1
from_utf8_owned() behavior
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-29/+29
2014-01-03librustc: De-`@mut` the span handlerPatrick Walton-1/+1
2014-01-03libsyntax: De-`@mut` `StringReader`, `TtReader`, and `reader`Patrick Walton-11/+11
2014-01-03libsyntax: De-`@mut` `StringReader::curr`Patrick Walton-22/+23
2014-01-03libsyntax: De-`@mut` `StringReader::col`Patrick Walton-2/+2
2014-01-03libsyntax: De-`@mut` `StringReader::last_pos`Patrick Walton-5/+9
2014-01-01syntax::diagnostic: Remove unnecessary traitsklutzy-1/+1
This removes trait `handler` and `span_handler`, and renames `HandlerT` to `Handler`, `CodemapT` to `SpanHandler`.
2013-12-04std::str: remove from_utf8.Huon Wilson-1/+1
This function had type &[u8] -> ~str, i.e. it allocates a string internally, even though the non-allocating version that take &[u8] -> &str and ~[u8] -> ~str are all that is necessary in most circumstances.
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-5/+3
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-4/+4
2013-11-11Move std::rt::io to std::ioAlex Crichton-1/+1
2013-10-28Remove the extension traits for Readers/WritersAlex Crichton-2/+1
These methods are all excellent candidates for default methods, so there's no need to require extra imports of various traits.
2013-10-24Remove even more of std::ioAlex Crichton-3/+4
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-16/+16
Who doesn't like a massive renaming?
2013-09-30syntax: Remove usage of fmt!Alex Crichton-16/+16
2013-09-25rustdoc: Improve comment strippingAlex Crichton-15/+40
There is less implicit removal of various comment styles, and it also removes extraneous stars occasionally found in docblock comments. It turns out that the bug for getops was just a differently formatted block. Closes #9425 Closes #9417
2013-09-20Implement a web backend for rustdoc_ngAlex Crichton-3/+1
This large commit implements and `html` output option for rustdoc_ng. The executable has been altered to be invoked as "rustdoc_ng html <crate>" and it will dump everything into the local "doc" directory. JSON can still be generated by changing 'html' to 'json'. This also fixes a number of bugs in rustdoc_ng relating to comment stripping, along with some other various issues that I found along the way. The `make doc` command has been altered to generate the new documentation into the `doc/ng/$(CRATE)` directories.
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-1/+1
2013-08-11libsyntax: Update from `@Object` to `@mut Object` as requiredNiko Matsakis-2/+2
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-1/+1
cc #5898
2013-08-03remove obsolete `foreach` keywordDaniel Micay-2/+2
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-2/+2
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-3/+3
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-1/+3
2013-06-28librustc: Remove the broken overloaded assign-ops from the language.Patrick Walton-3/+3
They evaluated the receiver twice. They should be added back with `AddAssign`, `SubAssign`, etc., traits.
2013-06-25great renaming propagation: syntaxCorey Richardson-5/+3
2013-06-16Do not strip leading whitespace when parsing doc comments.SiegeLord-23/+65
This change prevents the indentation in code blocks inside the /// doc comments from being eaten. The indentation that is the same across the consecutive doc comments is removed by the uindent_pass in librustdoc.
2013-06-16auto merge of #7123 : huonw/rust/more-str, r=thestingerbors-8/+6
Moves all the remaining functions that could reasonably be methods to be methods, except for some FFI ones (which I believe @erickt is working on, possibly) and `each_split_within`, since I'm not really sure the details of it (I believe @kimundi wrote the current implementation, so maybe he could convert it to an external iterator method on `StrSlice`, e.g. `word_wrap_iter(&self) -> WordWrapIterator<'self>`, where `WordWrapIterator` impls `Iterator<&'self str>`. It probably won't be too hard, since it's already a state machine.) This also cleans up the comparison impls for the string types, except I'm not sure how the lang items `eq_str` and `eq_str_uniq` need to be handled, so they (`eq_slice` and `eq`) remain stand-alone functions.
2013-06-15auto merge of #7114 : pnkfelix/rust/issue3961-fix-whitespace-detection, r=brsonbors-14/+23
r? (yes, the review request is back, now that I got it building against incom... I mean master!) (Attempting to port from orphaned pull-request #6764 ) Fix for #3961. Also includes a test case to illustrate the issues. (All of the entries that say "should align" should align with each other, and the four lines near the end that say "compare _" for _ in {A,B,C,D} should line up with each other.) Before applying this change set: -- the "(should align)"'s are all over the place, and the form/line feeding spaces are not cut out as one might or might not expect. -- compare B and D do not match A and C. (To be honest, its hard to really say what the right behavior is here, and people who are expecting a particular behavior out of a pretty printer in these cases may well get burned.)
2013-06-16std: convert str::{map,levdistance,subslice_offset} to methods.Huon Wilson-8/+6
The first two become map_chars and lev_distance. Also, remove a few allocations in rustdoc.
2013-06-14add IteratorUtil to the preludeDaniel Micay-1/+0
2013-06-14fixed code to placate new restrictions on form of function/method invocations.Felix S. Klock II-1/+1
2013-06-13Fix #3961 : use char range methods instead of byte offsets to detect whitespace.Felix S. Klock II-14/+23
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-2/+2
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-06-10std: remove str::{connect,concat}*.Huon Wilson-1/+1
2013-06-10std: convert str::reserve* to methods, and methodise str::push_*.Huon Wilson-3/+3
2013-06-10std: remove str::{len, slice, is_empty} in favour of methods.Huon Wilson-2/+2
2013-06-08auto merge of #7004 : dotdash/rust/allocs, r=thestingerbors-4/+5
This removes some unnecessary allocations in the lexer, the typechecker and the metadata decoder. Reduces the time spent in the parsing and typechecking passes by about 10% for me.
2013-06-09remove unused import warningsHuon Wilson-1/+0
2013-06-09std: remove each_char* fns and methods from str, replaced by iterators.Huon Wilson-2/+3
2013-06-08Lexer: Fix offset handling in get_str_from()Björn Steinbrink-1/+1
As the comment said, the subtraction is bogus for multibyte characters. Fortunately, we can just use last_pos instead of pos to get the correct position without any subtraction hackery.