about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
AgeCommit message (Collapse)AuthorLines
2014-06-13syntax: parse outer attributes in `quote_item!` calls.Huon Wilson-0/+5
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-1/+1
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/+34
* 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/+34
* 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/+7
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-117/+124
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-06-09librustc: Implement sugar for the `FnMut` traitPatrick Walton-13/+71
2014-06-05Fallout from the libcollections movementAlex Crichton-1/+1
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-2/+2
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-41/+37
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-4/+4
r=alexcrichton This should block on #14323
2014-05-27std: Rename strbuf operations to stringRicho Healey-3/+3
[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-10/+10
[breaking-change]
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-127/+13
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-127/+13
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-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-2/+4
[breaking-change]
2014-05-22libstd: Remove all uses of `~str` from `libstd`Patrick Walton-3/+3
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-51/+76
2014-05-20syntax: Parse global paths in patternsAlex Crichton-1/+1
Closes #6449
2014-05-17syntax: Tighten search paths for inner modulesAlex Crichton-6/+44
This is an implementation of RFC 16. A module can now only be loaded if the module declaring `mod name;` "owns" the current directory. A module is considered as owning its directory if it meets one of the following criteria: * It is the top-level crate file * It is a `mod.rs` file * It was loaded via `#[path]` * It was loaded via `include!` * The module was declared via an inline `mod foo { ... }` statement For example, this directory structure is now invalid // lib.rs mod foo; // foo.rs mod bar; // bar.rs; fn bar() {} With this change `foo.rs` must be renamed to `foo/mod.rs`, and `bar.rs` must be renamed to `foo/bar.rs`. This makes it clear that `bar` is a submodule of `foo`, and can only be accessed through `foo`. RFC: 0016-module-file-system-hierarchy Closes #14180 [breaking-change]
2014-05-13syntax: Fix parsing << with closure typesAlex Crichton-6/+54
This uses the trick of replacing the << token with a < token to parse closure types correctly. Closes #13324
2014-05-13Touch up and rebase previous commitsAlex Crichton-3/+0
* Added `// no-pretty-expanded` to pretty-print a test, but not run it through the `expanded` variant. * Removed #[deriving] and other expanded attributes after they are expanded * Removed hacks around &str and &&str and friends (from both the parser and the pretty printer). * Un-ignored a bunch of tests
2014-05-12Cleanup some ugly variable names, now that we have `let`-hygiene.Paul Stansifer-14/+14
2014-05-12Add some long-overdue documentation on the INTERPOLATED helper macros.Paul Stansifer-1/+6
2014-05-09Register new snapshotsAlex Crichton-6/+0
2014-05-08libsyntax: Remove uses of `~str` from libsyntax, and fix falloutPatrick Walton-7/+13
2014-05-07auto merge of #14005 : alexcrichton/rust/extern-unsafe, r=pcwaltonbors-14/+24
Previously, the parser would not allow you to simultaneously implement a function with a different abi as well as being unsafe at the same time. This extends the parser to allow functions of the form: unsafe extern fn foo() { // ... } The closure type grammar was also changed to reflect this reversal, types previously written as "extern unsafe fn()" must now be written as "unsafe extern fn()". The parser currently has a hack which allows the old style, but this will go away once a snapshot has landed. Closes #10025 [breaking-change]
2014-05-07auto merge of #13958 : pcwalton/rust/detilde, r=pcwaltonbors-5/+21
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. r? @brson or @alexcrichton or whoever
2014-05-07auto merge of #13914 : alexcrichton/rust/pile-o-rustdoc-fixes, r=brsonbors-6/+2
Lots of assorted things here and there, all the details are in the commits. Closes #11712
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-5/+21
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-05-06rustc: Enable writing "unsafe extern fn() {}"Alex Crichton-14/+24
Previously, the parser would not allow you to simultaneously implement a function with a different abi as well as being unsafe at the same time. This extends the parser to allow functions of the form: unsafe extern fn foo() { // ... } The closure type grammar was also changed to reflect this reversal, types previously written as "extern unsafe fn()" must now be written as "unsafe extern fn()". The parser currently has a hack which allows the old style, but this will go away once a snapshot has landed. Closes #10025 [breaking-change]
2014-05-04auto merge of #13908 : pcwalton/rust/box-pattern, r=alexcrichtonbors-0/+13
r? @alexcrichton
2014-05-04auto merge of #13898 : nikomatsakis/rust/type-bounds-b, r=acrichtobors-4/+3
This is needed to bootstrap fix for #5723.
2014-05-03Temporary patch to accept arbitrary lifetimes (behind feature gate) in bound ↵Niko Matsakis-4/+3
lists. This is needed to bootstrap fix for #5723.
2014-05-03syntax: Fix duplicate attributes on module filesAlex Crichton-6/+2
The outer attributes were manually appended when a module file was parsed, but the attributes were also added higher up the stack of parsing (when the module finished parsing). This removes the append in parsing the module file. Closes #13826
2014-05-02Replace most ~exprs with 'box'. #11779Brian Anderson-1/+1
2014-05-02libsyntax: Add `box PAT` to the pattern grammar. RFC #14.Patrick Walton-0/+13
2014-04-30librustc: Remove `~"string"` and `&"string"` from the languagePatrick Walton-22/+5