about summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
AgeCommit message (Collapse)AuthorLines
2019-11-07syntax::parser::token -> syntax::tokenMazdak Farrokhzad-728/+0
2019-11-07parser: allow ABIs from literal macro fragmentsMazdak Farrokhzad-7/+0
2019-11-07cleanup can_begin_const_argMazdak Farrokhzad-3/+1
2019-10-28Use heuristics to recover parsing of missing `;`Esteban Küber-25/+26
- Detect `,` and `:` typos where `;` was intended. - When the next token could have been the start of a new statement, detect a missing semicolon.
2019-10-18Rollup merge of #65364 - XiangQingW:master, r=estebankTyler Mandry-1/+1
Collect occurrences of empty blocks for mismatched braces diagnostic Fix #63904
2019-10-16move syntax::ext to new crate syntax_expandMazdak Farrokhzad-7/+7
2019-10-13token: extract Nonterminal::to_tokenstream to parser.Mazdak Farrokhzad-134/+3
2019-10-13Collect occurrences of for mismatched braces diagnosticwangxiangqing-1/+1
Change-Id: I20ba0b62308370ee961141fa1aefc4b9c9f0cb3a
2019-09-30syntax: Support modern attribute syntax in the `meta` matcherVadim Petrochenkov-1/+1
2019-08-27Simplify with Symbol/Token::is_book_lit.Mazdak Farrokhzad-4/+7
2019-08-27token: refactor with is_non_raw_ident_where.Mazdak Farrokhzad-19/+13
2019-08-19glue tokens when building token streamAleksey Kladov-1/+1
2019-08-05add unknown tokenAleksey Kladov-1/+3
2019-07-31Address review comments.Mazdak Farrokhzad-2/+2
2019-07-30Account for maybe_whole_expr in range patterns.Mazdak Farrokhzad-0/+13
2019-07-10Remove duplicate attr_to_stringMark Rousskov-1/+1
attribute_to_string exists.
2019-07-10Move literal_to_string to fmt::DisplayMark Rousskov-0/+28
2019-06-23let_chains: readd kw::let to ident_can_begin_expr.Mazdak Farrokhzad-2/+1
2019-06-23let_chains: Comment out Let in ident_can_begin_expr.Mazdak Farrokhzad-1/+2
2019-06-23let_chains: Add support for parsing let expressions.Mazdak Farrokhzad-0/+1
2019-06-08syntax: Move some `Token` methods aroundVadim Petrochenkov-48/+40
2019-06-08syntax: Remove `Deref` impl from `Token`Vadim Petrochenkov-18/+11
2019-06-08syntax: Move most of the `TokenKind` methods to `Token`Vadim Petrochenkov-75/+41
2019-06-06Some code cleanup and tidy/test fixesVadim Petrochenkov-2/+1
2019-06-06syntax: Switch function parameter order in `TokenTree::token`Vadim Petrochenkov-4/+4
2019-06-06syntax: Remove duplicate span from `token::Ident`Vadim Petrochenkov-35/+59
2019-06-06syntax: Remove duplicate span from `token::Lifetime`Vadim Petrochenkov-17/+26
2019-06-06syntax: Add some helper methods to `Token`Vadim Petrochenkov-1/+17
2019-06-06syntax: Use `Token` in `TokenTree::Token`Vadim Petrochenkov-6/+15
2019-06-06syntax: Rename `TokenAndSpan` into `Token`Vadim Petrochenkov-0/+12
2019-06-06syntax: Rename `Token` into `TokenKind`Vadim Petrochenkov-14/+14
2019-06-06Always use token kinds through `token` module rather than `Token` typeVadim Petrochenkov-2/+2
2019-05-27Use `Symbol` equality in `is_ident_named`.Nicholas Nethercote-2/+2
2019-05-23syntax: Some code cleanupVadim Petrochenkov-7/+9
2019-05-23syntax: Turn `token::Lit` into a structVadim Petrochenkov-44/+51
2019-05-23syntax: Remove an obsolete hack from literal comparisonsVadim Petrochenkov-9/+1
2019-05-23syntax: Return named errors from literal parsing functionsVadim Petrochenkov-2/+23
2019-05-22Simplify use of keyword symbolsVadim Petrochenkov-37/+37
2019-05-19Improve type size assertionsVadim Petrochenkov-3/+3
Now they - Tell what the new size is, when it changes - Do not require passing an identifier
2019-05-12Auto merge of #60767 - Centril:rollup-4cbsb73, r=Centrilbors-10/+4
Rollup of 4 pull requests Successful merges: - #60694 (Fix HIR printing of existential type #60662) - #60750 (syntax: Remove some legacy nonterminal tokens) - #60751 (Assorted cleanup in parser & AST validation) - #60752 (Fix minor typos for ItemLocalId) Failed merges: r? @ghost
2019-05-12syntax: Remove some legacy nonterminal tokensVadim Petrochenkov-10/+4
2019-05-11Simplify conversions between tokens and semantic literalsVadim Petrochenkov-0/+7
2019-05-11Keep the original token in `ast::Lit`Vadim Petrochenkov-0/+5
2019-05-07Implement built-in await syntaxTaylor Cramer-0/+5
Adds support for .await under the existing async_await feature gate. Moves macro-like await! syntax to the await_macro feature gate. Removes support for `await` as a non-keyword under the `async_await` feature.
2019-03-06Simplify codeEsteban Küber-18/+3
2019-03-06Emit missing unclosed delimiter errorsEsteban Küber-6/+6
2019-02-18Make `interpolated_to_tokenstream` a method on `Nonterminal`.Nicholas Nethercote-82/+81
2019-02-18Remove `LazyTokenStream`.Nicholas Nethercote-85/+28
It's present within `Token::Interpolated` as an optimization, so that if a nonterminal is converted to a `TokenStream` multiple times, the first-computed value is saved and reused. But in practice it's not needed. `interpolated_to_tokenstream()` is a cold function: it's only called a few dozen times while compiling rustc itself, and a few hundred times across the entire `rustc-perf` suite. Furthermore, when it is called, it is almost always the first conversion, so no benefit is gained from it. So this commit removes `LazyTokenStream`, along with the now-unnecessary `Token::interpolated()`. As well as a significant simplification, the removal speeds things up slightly, mostly due to not having to `drop` the `LazyTokenStream` instances.
2019-02-18Change `Token::interpolated_to_tokenstream()`.Nicholas Nethercote-9/+3
It is currently a method of `Token`, but it only is valid to call if `self` is a `Token::Interpolated`. This commit eliminates the possibility of misuse by changing it to an associated function that takes a `Nonterminal`, which also simplifies the call sites. This requires splitting out a new function, `nonterminal_to_string`.
2019-02-10rustc: doc commentsAlexander Regueiro-10/+10