about summary refs log tree commit diff
path: root/src/libsyntax/util
AgeCommit message (Collapse)AuthorLines
2020-02-29Move directory `libsyntax` -> `librustc_ast`Vadim Petrochenkov-1333/+0
2020-02-24Add some missing support for `NtIdent`Vadim Petrochenkov-3/+10
2020-02-22Rename CodeMap to SourceMap follow upMaxim Zholobak-2/+2
2020-02-13parser: fuse free `fn` parsing together.Mazdak Farrokhzad-0/+2
2020-02-01syntax::print -> new crate rustc_ast_prettyMazdak Farrokhzad-5/+3
2020-02-01pretty: remove ParseSess dependencyMazdak Farrokhzad-3/+2
2020-02-01{syntax -> rustc_ast_passes}::node_countMazdak Farrokhzad-139/+0
2020-01-09Rollup merge of #67849 - cjkenn:check-sorted-words, r=estebankYuki Okushi-5/+34
Add a check for swapped words when we can't find an identifier Fixes #66968 Couple things here: 1. The matches take the precedence of case insensitive match, then levenshtein match, then swapped words match. Doing this allows us to not even check for swapped words unless the other checks return `None`. 2. I've assumed that the swapped words check is not held to the limits of the max levenshtein distance threshold (ie. we want to try and find a match even if the levenshtein distance is very high). This means that we cannot perform this check in the `fold` that occurs after the `filter_map` call, because the candidate will be filtered out. So, I've split this into two separate `fold` calls, and had to collect the original iterator into a vec so it can be copied (I don't think we want to change the function signature to take a vec or require the `Copy` trait). An alternative implemenation may be to remove the `filter_map`, `fold` over the entire iterator, and do a check against `max_dist` inside the relevant cases there. r? @estebank
2020-01-03missed tidy checkcjkenn-2/+2
2020-01-03add a check for variable names that might match by wordcjkenn-5/+34
2020-01-02syntax::map_in_place: leave fixmeMazdak Farrokhzad-0/+2
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-4/+6
2020-01-02Normalize `syntax::source_map` imports.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-3/+3
2019-12-23Add span information to `ExprKind::Assign`varkor-1/+1
2019-12-22Format the worldMark Rousskov-164/+167
2019-12-12Unify assoc item visitors more.Mazdak Farrokhzad-5/+1
2019-12-12Unify associated item visitor.Mazdak Farrokhzad-2/+2
2019-12-06Use `to_option` in various placesvarkor-1/+1
2019-11-10move syntax::parse -> librustc_parseMazdak Farrokhzad-9/+9
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10move config.rs to libsyntax_expandMazdak Farrokhzad-1/+2
2019-11-07move syntax::{parse::literal -> util::literal}Mazdak Farrokhzad-0/+305
2019-11-07move syntax::parse::lexer::comments -> syntax::util::commentsMazdak Farrokhzad-0/+317
2019-11-07move parse::classify -> util::classifyMazdak Farrokhzad-0/+25
2019-11-07syntax::parser::token -> syntax::tokenMazdak Farrokhzad-1/+1
2019-09-26Rename `Expr.node` to `Expr.kind`varkor-1/+1
For both `ast::Expr` and `hir::Expr`.
2019-09-06reduce visibilityAleksey Kladov-1/+1
2019-08-24Modifies how Arg, Arm, Field, FieldPattern and Variant are visitedCaio-4/+3
Part of the necessary work to accomplish #63468.
2019-08-12Bring back suggestion for splitting `<-` into `< -`Ilija Tovilo-0/+2
Closes #62632
2019-08-02libsyntax: Unconfigure tests during normal buildVadim Petrochenkov-217/+61
2019-07-30Unsupport the await!(..) macro.Mazdak Farrokhzad-1/+1
2019-07-20Introduce rustc_lexerAleksey Kladov-4/+4
The idea here is to make a reusable library out of the existing rust-lexer, by separating out pure lexing and rustc-specific concerns, like spans, error reporting an interning. So, rustc_lexer operates directly on `&str`, produces simple tokens which are a pair of type-tag and a bit of original text, and does not report errors, instead storing them as flags on the token.
2019-07-11Emit dropped unemitted errors to aid in ICE debuggingEsteban Küber-3/+3
2019-07-03Add missing lifetime specifierJeremy Stucki-1/+1
2019-07-03Remove needless lifetimesJeremy Stucki-1/+1
2019-06-23let_chains: Fix bugs in pretty printing.Mazdak Farrokhzad-0/+16
2019-06-23let_chains: Add support for parsing let expressions.Mazdak Farrokhzad-4/+3
2019-06-14Change `...` to `..=` where applicableAaron Kutch-1/+1
2019-06-08syntax: Move most of the `TokenKind` methods to `Token`Vadim Petrochenkov-3/+3
2019-06-06syntax: Rename `Token` into `TokenKind`Vadim Petrochenkov-2/+2
2019-06-06Always use token kinds through `token` module rather than `Token` typeVadim Petrochenkov-25/+25
2019-06-05Implemented for function bounds, type bounds, and named existential types.Alexander Regueiro-2/+2
2019-05-24Remove `ObsoleteInPlace`varkor-10/+4
2019-05-22Simplify use of keyword symbolsVadim Petrochenkov-2/+2
2019-05-21Move `edition` outside the hygiene lock and avoid accessing itJohn Kåre Alsaker-2/+2
2019-05-09Rollup merge of #60188 - estebank:recover-block, r=varkorMazdak Farrokhzad-0/+25
Identify when a stmt could have been parsed as an expr There are some expressions that can be parsed as a statement without a trailing semicolon depending on the context, which can lead to confusing errors due to the same looking code being accepted in some places and not others. Identify these cases and suggest enclosing in parenthesis making the parse non-ambiguous without changing the accepted grammar. Fix #54186, cc #54482, fix #59975, fix #47287.
2019-05-07Implement built-in await syntaxTaylor Cramer-0/+3
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-05-06review comments: fix typo and add commentsEsteban Küber-1/+4
2019-04-29Identify when a stmt could have been parsed as an exprEsteban Küber-0/+22
There are some expressions that can be parsed as a statement without a trailing semicolon depending on the context, which can lead to confusing errors due to the same looking code being accepted in some places and not others. Identify these cases and suggest enclosing in parenthesis making the parse non-ambiguous without changing the accepted grammar.
2019-02-10rustc: doc commentsAlexander Regueiro-5/+5