about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2014-11-11syntax: improve message for misused inner attributesLiigo Zhuang-0/+2
2014-11-07Purge the old `once_fns`, which are not coming backNiko Matsakis-30/+29
2014-11-07Update parser with `for` syntaxNiko Matsakis-136/+174
2014-11-07auto merge of #17830 : pczarn/rust/interp_tt, r=pnkfelixbors-70/+36
Closes #14197 Removes the `matchers` nonterminal. If you're using `$foo:matchers` in a macro, write `$foo:tt` instead. [breaking-change]
2014-11-07Add `ast::SequenceRepetition`Piotr Czarnecki-2/+9
2014-11-06Remove the unboxed closure `|:|` notation from types and trait references ↵Niko Matsakis-50/+16
completely.
2014-11-06Support parenthesized paths `Foo(A,B) -> C` that expand to `Foo<(A,B),C>`. ↵Niko Matsakis-60/+62
These paths also bind anonymous regions (or will, once HRTB is fully working). Fixes #18423.
2014-11-06Restructure parsing of paths, which is quite torturedNiko Matsakis-42/+108
2014-11-05Remove `Matcher`sPiotr Czarnecki-64/+2
2014-11-05Use `TokenTree`s in lhs of macrosPiotr Czarnecki-5/+26
2014-11-05Register snapshots.Eduard Burtescu-94/+0
2014-11-04libsyntax: Forbid escapes in the inclusive range `\x80`-`\xff` inPatrick Walton-4/+19
Unicode characters and strings. Use `\u0080`-`\u00ff` instead. ASCII/byte literals are unaffected. This PR introduces a new function, `escape_default`, into the ASCII module. This was necessary for the pretty printer to continue to function. RFC #326. Closes #18062. [breaking-change]
2014-11-03rollup merge of #18562 : nick29581/dxr-1Alex Crichton-17/+16
2014-11-03rollup merge of #18506 : nikomatsakis/assoc-type-boundsAlex Crichton-7/+4
2014-11-03rollup merge of #18318 : arielb1/transmute-cleanupAlex Crichton-2/+2
2014-11-03Restructure AST so that the associated type definition carriesNiko Matsakis-7/+4
bounds like any other "type parameter".
2014-11-03Clean-up transmutes in libsyntaxAriel Ben-Yehuda-2/+2
2014-11-03Ignore whitespace tokens when re-computing spans in save_analysisNick Cameron-17/+16
2014-11-02Convert some notes to help messagesP1start-5/+14
Closes #18126.
2014-10-30Test fixes and rebase conflictsAlex Crichton-7/+7
2014-10-30rollup merge of #18430 : bjz/tokenAlex Crichton-296/+273
Conflicts: src/libsyntax/parse/parser.rs
2014-10-30rollup merge of #18398 : aturon/lint-conventions-2Alex Crichton-2/+2
Conflicts: src/libcollections/slice.rs src/libcore/failure.rs src/libsyntax/parse/token.rs src/test/debuginfo/basic-types-mut-globals.rs src/test/debuginfo/simple-struct.rs src/test/debuginfo/trait-pointers.rs
2014-10-30Add a message for when a `.` follows a macro invocationP1start-0/+10
2014-10-30Improve the error message for parenthesised box expressionsP1start-0/+14
Closes #15386.
2014-10-30Formatting fixesBrendan Zabarauskas-13/+21
2014-10-30Remove Token::get_close_delimiterBrendan Zabarauskas-58/+33
We can simplify these usages due to the new delimiter representation. `Parser::expect_open_delim` has been added for convenience.
2014-10-30Use common variants for open and close delimitersBrendan Zabarauskas-234/+228
This common representation for delimeters should make pattern matching easier. Having a separate `token::DelimToken` enum also allows us to enforce the invariant that the opening and closing delimiters must be the same in `ast::TtDelimited`, removing the need to ensure matched delimiters when working with token trees.
2014-10-29Rename fail! to panic!Steve Klabnik-25/+25
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-28Update code with new lint namesAaron Turon-2/+2
2014-10-28Move token-to-string functions into print::pprustBrendan Zabarauskas-98/+4
2014-10-28Use an enum rather than a bool in token::IdentBrendan Zabarauskas-53/+86
2014-10-28Convert some token functions into methodsBrendan Zabarauskas-293/+288
2014-10-28Use PascalCase for token variantsBrendan Zabarauskas-843/+885
2014-10-26Update parse::test::string_to_tts_1 testBrendan Zabarauskas-113/+100
2014-10-26Add a KleeneOp enum for clarityBrendan Zabarauskas-13/+16
2014-10-26Reduce the size of the TokenTreeBrendan Zabarauskas-1/+1
2014-10-26Use standard capitalisation for TokenTree variantsBrendan Zabarauskas-33/+33
2014-10-26Rename TokenTree variants for clarityBrendan Zabarauskas-30/+30
This should be clearer, and fits in better with the `TTNonterminal` variant. Renames: - `TTTok` -> `TTToken` - `TTDelim` -> `TTDelimited` - `TTSeq` -> `TTSequence`
2014-10-26Add Span and separate open/close delims to TTDelimBrendan Zabarauskas-34/+39
This came up when working [on the gl-rs generator extension](https://github.com/bjz/gl-rs/blob/990383de801bd2e233159d5be07c9b5622827620/src/gl_generator/lib.rs#L135-L146). The new definition of `TTDelim` adds an associated `Span` that covers the whole token tree and enforces the invariant that a delimited sequence of token trees must have an opening and closing delimiter. A `get_span` method has also been added to `TokenTree` type to make it easier to implement better error messages for syntax extensions.
2014-10-24Add a lint for not using field pattern shorthandsP1start-15/+24
Closes #17792.
2014-10-22auto merge of #18141 : phildawes/rust/master, r=brsonbors-3/+49
Hello! I noticed spans are wrong for the PatIdents of self args. (I use spans a lot in racer)
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-43/+49
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-18Parser: Fix spans of explicit self arg identsPhil Dawes-3/+49
2014-10-17auto merge of #16855 : P1start/rust/help-messages, r=brsonbors-0/+3
This adds ‘help’ diagnostic messages to rustc. This is used for anything that provides help to the user, particularly the `--explain` messages that were previously integrated into the relevant error message. They look like this: ``` match.rs:10:13: 10:14 error: unreachable pattern [E0001] match.rs:10 1 => {}, ^ match.rs:3:1: 3:38 note: in expansion of foo! match.rs:7:5: 20:2 note: expansion site match.rs:10:13: 10:14 help: pass `--explain E0001` to see a detailed explanation ``` (`help` is coloured cyan.) Adding these errors on a separate line stops the lines from being too long, as discussed in #16619.
2014-10-16libsyntax: Remove all uses of {:?}.Luqman Aden-9/+9
2014-10-13auto merge of #17733 : jgallagher/rust/while-let, r=alexcrichtonbors-1/+18
This is *heavily* based on `if let` (#17634) by @jakub- and @kballard This should close #17687
2014-10-13auto merge of #17757 : gamazeps/rust/issue17709, r=alexcrichtonbors-5/+14
I did not put the crate name in the error note, if that's necessary I'll look into it. Closes #17709
2014-10-11Remove `virtual` structs from the languageJakub Wieczorek-23/+7
2014-10-10Teach libsyntax about `while let`John Gallagher-1/+18
2014-10-09syntax: Convert statics to constantsAlex Crichton-12/+12