about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer.rs
AgeCommit message (Collapse)AuthorLines
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
2013-11-02Added octal literal support.Matt Carberry-0/+13
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-3/+3
Who doesn't like a massive renaming?
2013-10-21Add support for nested commentsGeorges Dubus-33/+41
Fixes #9468.
2013-10-08add token::LIT_STR_RAW(ident, num of # symbols)Benjamin Herr-2/+2
Treat it as a synonym for LIT_STR for now.
2013-10-08lex raw string literals, like r#"blah"#Benjamin Herr-2/+66
Raw string literals are lexed into regular string literals. This is okay for them to "work" and be usable/testable, but the pretty-printer does not know about them yet and will just emit regular string literals.
2013-10-02auto merge of #9665 : alexcrichton/rust/snapshot, r=brsonbors-1/+1
Uses the new snapshots to kill the old `loop` and introduce the new `continue`.
2013-10-01Migrate users of 'loop' to 'continue'Alex Crichton-1/+1
Closes #9467
2013-10-01remove the `float` typeDaniel Micay-6/+1
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30syntax: Remove usage of fmt!Alex Crichton-4/+3
2013-09-25auto merge of #9481 : jbclements/rust/minor-cleanup, r=cmrbors-1/+0
Small stuff... might as well get it into the tree. One new test case, some issue # cleanup, remove some unused imports.
2013-09-24Disallow char literals which should be escapedAlex Crichton-21/+28
As documented in issue #7945, these literal identifiers are all accepted by rust today, but they should probably be disallowed (especially `'''`). This changes all escapable sequences to being *required* to be escaped. Closes #7945
2013-09-24cleanupJohn Clements-1/+0
2013-09-19lexer: further slight improvements to lexer errorsBenjamin Herr-16/+30
2013-09-19lexer: report problematic chars verbatim or as escape sequenceBenjamin Herr-12/+23
... instead of giving their numeric codepoint, following the lead of fdaae34. So the error message for, say, '\_' mentions _ instead of 95, and '\●' now mentions \u25cf.