summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer.rs
AgeCommit message (Collapse)AuthorLines
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.
2013-09-19lexer: show correct span on lexical errorsBenjamin Herr-19/+59
Previously, the lexer calling `rdr.fatal(...)` would report the span of the last complete token, instead of a span within the erroneous token (besides one span fixed in 1ac90bb). This commit adds a wrapper around `rdr.fatal(...)` that sets the span explicilty, so that all fatal errors in `libsyntax/parse/lexer.rs` now report the offending code more precisely. A number of tests try to verify that, though the `compile-fail` testing setup can only check that the spans are on the right lines, and the "unterminated string/block comment" errors can't have the line marked at all, so that's incomplete. Closes #9149.
2013-09-17Added support for a `\0` escape sequence.Daniel Rosenwasser-0/+2
This commit adds support for `\0` escapes in character and string literals. Since `\0` is equivalent to `\x00`, this is a direct translation to the latter escape sequence. Future builds will be able to compile using `\0` directly. Also updated the grammar specification and added a test for NUL characters.
2013-09-15Remove {uint,int,u64,i64,...}::from_str,from_str_radixblake2-ppc-3/+3
Remove these in favor of the two traits themselves and the wrapper function std::from_str::from_str. Add the function std::num::from_str_radix in the corresponding role for the FromStrRadix trait.
2013-09-04stop treating char as an integer typeDaniel Micay-9/+13
Closes #7609
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-6/+6
2013-08-15Better error message for unknown start of tokenKevin Ballard-1/+3
The span was fixed at some point to point to the correct character, but the error message is still bad. Update it to emit the actual character in question (potentially escaped). Fixes #3747.
2013-08-11libsyntax: Update from `@Object` to `@mut Object` as requiredNiko Matsakis-10/+11
2013-08-08Allow attributes to appear as macro argumentsNiko Matsakis-1/+5
Fixes #8393
2013-08-03remove obsolete `foreach` keywordDaniel Micay-1/+1
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-1/+1