about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer.rs
AgeCommit message (Collapse)AuthorLines
2014-06-04syntax: methodify the lexerCorey Richardson-1112/+0
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-1/+1
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-27std: Rename strbuf operations to stringRicho Healey-17/+17
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-6/+6
[breaking-change]
2014-05-23Make most lexer errors non-fatalKevin Ballard-142/+103
Most errors that arise in the lexer can be recovered from. This allows for more than one syntax error to be reported at a time.
2014-05-23auto merge of #14360 : alexcrichton/rust/remove-deprecated, r=kballardbors-4/+1
These have all been deprecated for awhile now, so it's likely time to start removing them.
2014-05-23syntax: Clean out obsolete syntax parsingAlex Crichton-4/+1
All of these features have been obsolete since February 2014, where most have been obsolete since 2013. There shouldn't be any more need to keep around the parser hacks after this length of time.
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-4/+3
2014-05-08libsyntax: Remove uses of `~str` from libsyntax, and fix falloutPatrick Walton-69/+90
2014-05-02Replace most ~exprs with 'box'. #11779Brian Anderson-2/+2
2014-05-02syntax: store char literals/tokens as `char`s rather than u32s.Huon Wilson-5/+5
Clearly storing them as `char` is semantically nicer, but this also fixes a bug whereby `quote_expr!(cx, 'a')` wasn't working, because the code created by quotation was not matching the actual AST definitions.
2014-04-22add support for quadruple precision floating pointDaniel Micay-3/+8
This currently requires linking against a library like libquadmath (or libgcc), because compiler-rt barely has any support for this and most hardware does not yet have 128-bit precision floating point. For this reason, it's currently hidden behind a feature gate. When compiler-rt is updated to trunk, some tests can be added for constant evaluation since there will be support for the comparison operators. Closes #13381
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-40/+41
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-17/+25
port all code over to use it.
2014-03-31syntax: Switch field privacy as necessaryAlex Crichton-10/+10
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