about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2014-06-18Don't require mutable StringReader to emit lexer errorsKevin Ballard-42/+52
Teach StringReader how to emit errors for arbitrary spans, so we don't need to modify peek_span. This allows for emitting errors without having a &mut borrow of the StringReader.
2014-06-18Fix spans for doc commentsKevin Ballard-3/+3
2014-06-18auto merge of #14880 : SimonSapin/rust/byte-literals, r=alexcrichtonbors-83/+213
See #14646 (tracking issue) and rust-lang/rfcs#69. This does not close the tracking issue, as the `bytes!()` macro still needs to be removed. It will be later, after a snapshot is made with the changes in this PR, so that the new syntax can be used when bootstrapping the compiler.
2014-06-18Remove TraitStore from ty_traitNick Cameron-2/+6
Use ty_rptr/ty_uniq(ty_trait) rather than TraitStore to represent trait types. Also addresses (but doesn't close) #12470. Part of the work towards DST (#12938). [breaking-change] lifetime parameters in `&mut trait` are now invariant. They used to be contravariant.
2014-06-18Fix some violations of stronger guarantees for mutable borrows.Simon Sapin-9/+17
See 159e27aebb940926ccf1bad0b2b12087d36ad903
2014-06-17Refactor backslash-escape parsing to share similar code.Simon Sapin-151/+69
Move into a new syntax::parse::lexer::StringReader method the code that was almost duplicated for parsing backslash-escapes in byte, byte string, char, and string literals.
2014-06-17Add br##"xx"## raw byte string literals.Simon Sapin-3/+61
2014-06-17Add a b"xx" byte string literal of type &'static [u8].Simon Sapin-53/+125
2014-06-17Add a b'x' byte literal of type u8.Simon Sapin-4/+78
2014-06-16rustc: Improve span for error about using a method as a field.Kevin Butler-2/+3
libsyntax: ExprField now contains a SpannedIdent rather than Ident. [breaking-change]
2014-06-15Register new snapshotsAlex Crichton-44/+4
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-4/+18
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-13Fix all violations of stronger guarantees for mutable borrowsCameron Zwarich-84/+158
Fix all violations in the Rust source tree of the stronger guarantee of a unique access path for mutable borrows as described in #12624.
2014-06-13syntax: parse outer attributes in `quote_item!` calls.Huon Wilson-2/+6
Fixes #14857.
2014-06-13libsyntax: Allow `+` to separate trait bounds from objects.Patrick Walton-51/+86
RFC #27. After a snapshot, the old syntax will be removed. This can break some code that looked like `foo as &Trait:Send`. Now you will need to write `foo as (&Trait+Send)`. Closes #12778. [breaking-change]
2014-06-13librustc: Fix the issue with labels shadowing variable names by makingPatrick Walton-64/+80
the leading quote part of the identifier for the purposes of hygiene. This adopts @jbclements' solution to #14539. I'm not sure if this is a breaking change or not. Closes #12512. [breaking-change]
2014-06-13auto merge of #14831 : alexcrichton/rust/format-intl, r=brsonbors-4/+41
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-4/+41
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-6/+12
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-2/+2
2014-06-11syntax: Move the AST from @T to Gc<T>Alex Crichton-160/+173
2014-06-10Fix more misspelled comments and strings.Joseph Crail-2/+2
2014-06-09librustc: Implement sugar for the `FnMut` traitPatrick Walton-13/+71
2014-06-06auto merge of #14667 : aochagavia/rust/pr2, r=huonwbors-1/+1
2014-06-06Change to_str().to_string() to just to_str()Adolfo Ochagavía-1/+1
2014-06-05Fallout from the libcollections movementAlex Crichton-1/+1
2014-06-04syntax: methodify the lexerCorey Richardson-1184/+1191
2014-06-03Add comments for the token tableCorey Richardson-0/+4
2014-06-03syntax: shuffle some allocation out of binop_to_strCorey Richardson-13/+13
2014-06-01std: Drop Total from Total{Eq,Ord}Alex Crichton-5/+5
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-9/+9
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-30libsyntax: Fix snake_case errors.Kevin Butler-47/+43
A number of functions/methods have been moved or renamed to align better with rust standard conventions. syntax::ext::mtwt::xorPush => xor_push syntax::parse::parser::Parser => Parser::new [breaking-change]
2014-05-30auto merge of #14517 : lucy/rust/issue-14499, r=alexcrichtonbors-1/+1
Fixes #8537 Fixes #14499 (duplicate of #8537) Old: ```rust test.rs:2 pub extern "xxxxx" fn add(x: int, y: int) -> int { ^~ ``` New: ```rust test.rs:2 pub extern "xxxxx" fn add(x: int, y: int) -> int { ^~~~~~~ ```
2014-05-29auto merge of #14483 : ahmedcharles/rust/patbox, r=alexcrichtonbors-3/+3
2014-05-29syntax: Fix span on illegal ABI errorslucy-1/+1
Fixes #8537 Fixes #14499
2014-05-28Parse macros in patternsKeegan McAllister-7/+20
Fixes #6830.
2014-05-27Rename PatUniq to PatBox. Fixes part of #13910.Ahmed Charles-3/+3
2014-05-27auto merge of #14414 : richo/rust/features/nerf_unused_string_fns, ↵bors-105/+105
r=alexcrichton This should block on #14323
2014-05-27std: Rename strbuf operations to stringRicho Healey-104/+104
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-1/+1
2014-05-26syntax: Add a source field to `Local` for tracking if it comes from `let`s ↵Huon Wilson-1/+2
or `for`s.
2014-05-25Allow $foo:block nonterminals in expression positionKevin Ballard-7/+11
Fixes #13678.
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-59/+59
[breaking-change]
2014-05-24Changes from feedbackSteven Fackler-4/+4
2014-05-24Add AttrId to Attribute_Steven Fackler-1/+7
2014-05-24auto merge of #14389 : Ryman/rust/14303, r=alexcrichtonbors-1/+13
Closes #14303.
2014-05-23Make most lexer errors non-fatalKevin Ballard-143/+104
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-23Improve error message for lifetimes after type params.Kevin Butler-1/+13
Closes #14303.
2014-05-23auto merge of #14360 : alexcrichton/rust/remove-deprecated, r=kballardbors-247/+48
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-247/+48
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.