about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer.rs
AgeCommit message (Collapse)AuthorLines
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
2013-07-17librustc: Change repeated vector expressions to use implicit copyability.Patrick Walton-2/+5
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-7/+9
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-9/+9
2013-06-28librustc: Remove the broken overloaded assign-ops from the language.Patrick Walton-4/+4
They evaluated the receiver twice. They should be added back with `AddAssign`, `SubAssign`, etc., traits.
2013-06-25great renaming propagation: syntaxCorey Richardson-6/+3
2013-06-23vec: remove BaseIter implementationDaniel Micay-1/+1
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-14add IteratorUtil to the preludeDaniel Micay-1/+0
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-14/+14
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-11lexer: show correct span on unrecognized token startPhilipp Brüschweiler-1/+5
Fixes part of #7048.
2013-06-10clean-up unused import warningsHuon Wilson-2/+1
2013-06-10std: convert str::char_at* to methods.Huon Wilson-2/+2