summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer.rs
AgeCommit message (Collapse)AuthorLines
2014-03-28Used inherited mutability in lexer::Reader.Eduard Burtescu-171/+150
2014-03-22syntax: Fix fallout of removing get()Alex Crichton-20/+16
2014-03-20syntax: Tidy up parsing the new attribute syntaxAlex Crichton-12/+18
2014-03-20Added new attribute syntax with backward compatibility.Daniel Fagnan-0/+18
Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-17Fix rustdoc and tests.Eduard Burtescu-54/+30
2014-03-17De-@ codemap and diagnostic.Eduard Burtescu-63/+63
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-0/+1
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-9/+9
2014-03-01auto merge of #12627 : alexcrichton/rust/issue-12623, r=brsonbors-1/+5
This helps prevent the unfortunate interleavings found in #12623.
2014-02-28std: Change assert_eq!() to use {} instead of {:?}Alex Crichton-1/+1
Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries.
2014-02-28rustdoc: Capture all output from rustc by defaultAlex Crichton-1/+5
This helps prevent interleaving of error messages when running rustdoc tests. This has an interesting bit of shuffling with I/O handles, but other than that this is just using the APIs laid out in the previous commit. Closes #12623
2014-02-24syntax: record multibyte chars' positions absolutely, not relative toHuon Wilson-2/+1
file. Previously multibyte UTF-8 chars were being recorded as byte offsets from the start of the file, and then later compared against global byte positions, resulting in the compiler possibly thinking it had a byte position pointing inside a multibyte character, if there were multibyte characters in any non-crate files. (Although, sometimes the byte offsets line up just right to not ICE, but that was a coincidence.) Fixes #11136. Fixes #11178.
2014-02-11Move replace and swap to std::mem. Get rid of std::utilEdward Wang-2/+2
Also move Void to std::any, move drop to std::mem and reexport in prelude.
2014-02-08syntax: convert the lexer to use Option<char> over transmute(-1).Huon Wilson-94/+135
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-51/+49
2014-02-02libsyntax: Fix tests.Patrick Walton-13/+13
2014-02-02libsyntax: Remove the unnecessary `src` field from the lexerPatrick Walton-9/+6
2014-01-26Removed all instances of XXX in preparation for relaxing of FIXME ruleSalem Talha-1/+1
2014-01-21Remove unnecessary parentheses.Huon Wilson-1/+1
2014-01-11Tighten up float literal lexing.SiegeLord-11/+16
Specifically, dissallow setting the number base for every type of float literal, not only those that contain the decimal point. This is in line with the description in the manual.
2014-01-11Remove re-exports of std::io::stdio::{print, println} in the prelude.Brendan Zabarauskas-1/+1
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-22/+20
2014-01-03libsyntax: De-`@mut` `CodeMap::files`Patrick Walton-1/+4
2014-01-03librustc: De-`@mut` the span handlerPatrick Walton-6/+6
2014-01-03libsyntax: De-`@mut` `StringReader`, `TtReader`, and `reader`Patrick Walton-44/+43
2014-01-03libsyntax: De-`@mut` `TtReader::cur_span`Patrick Walton-2/+2
2014-01-03libsyntax: De-`@mut` `TtReader::cur_tok`Patrick Walton-2/+5
2014-01-03libsyntax: De-`@mut` `StringReader::peek_span`Patrick Walton-9/+10
2014-01-03libsyntax: De-`@mut` `StringReader::peek_tok`Patrick Walton-10/+13
2014-01-03libsyntax: De-`@mut` `StringReader::curr`Patrick Walton-54/+57
2014-01-03libsyntax: De-`@mut` `StringReader::col`Patrick Walton-5/+5
2014-01-03libsyntax: De-`@mut` `StringReader::last_pos`Patrick Walton-43/+45
2014-01-03libsyntax: De-`@mut` `StringReader::pos`Patrick Walton-13/+14
2014-01-03auto merge of #11149 : alexcrichton/rust/remove-either, r=brsonbors-13/+13
Had to change some stuff in typeck to bootstrap (getting methods in fmt off of Either), but other than that not so painful. Closes #9157
2014-01-03Remove std::eitherAlex Crichton-13/+13
2014-01-01syntax::codemap: Add static DUMMY_SPklutzy-1/+1
It replaces `dummy_sp()`.
2014-01-01syntax::diagnostic: Remove unnecessary traitsklutzy-7/+7
This removes trait `handler` and `span_handler`, and renames `HandlerT` to `Handler`, `CodemapT` to `SpanHandler`.
2013-12-11Make 'self lifetime illegal.Erik Price-6/+7
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-08Remove dead codesKiet Tran-13/+0
2013-12-05Forbid keywords as lifetime parameters names.Léo Testard-1/+11
2013-11-27Be more strict about doc commentsCorey Richardson-4/+2
Previously, `//// foo` and `/*** foo ***/` were accepted as doc comments. This changes that, so that only `/// foo` and `/** foo ***/` are accepted. This confuses many newcomers and it seems weird. Also update the manual for these changes, and modernify the EBNF for comments. Closes #10638
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-8/+8
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-2/+2
2013-11-20auto merge of #10567 : sanxiyn/rust/bytepos, r=alexcrichtonbors-5/+5
2013-11-20Make BytePos 32-bitSeo Sanghyeon-5/+5
2013-11-19libsyntax: Change all uses of `&fn` to `||`.Patrick Walton-5/+11
2013-11-07auto merge of #10243 : mattcarberry/rust/master, r=brsonbors-0/+13
Associated with Issue #6563. Useful for Apollo Guidance Computer simulation, Unix file system permissions, and maybe one or two other things.
2013-11-04libsyntax/librustc: Allow calling variadic foreign functions.Luqman Aden-6/+12