about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser.rs
AgeCommit message (Collapse)AuthorLines
2018-06-20Fix HasAttrs support for GenericParamvarkor-1/+1
2018-06-20Remove name from GenericParamKind::Lifetimevarkor-3/+1
2018-06-20Use ParamBounds in WhereRegionPredicatevarkor-6/+4
2018-06-20Lift bounds into GenericParamvarkor-10/+12
2018-06-20Rename structures in astvarkor-14/+14
2018-06-20Refactor ast::GenericParam as a structvarkor-25/+25
2018-06-20Rename ast::GenericParam and ast::GenericArgvarkor-12/+11
It's so confusing to have everything having the same name, at least while refactoring.
2018-06-20Rename "parameter" to "arg"varkor-15/+15
2018-06-20Rename *Parameter to *Paramvarkor-4/+4
2018-06-20Consolidate PathParameters and AngleBracketedParameterDatavarkor-9/+11
2018-06-19Update error code numbersEsteban Küber-2/+2
2018-06-19Fix tidy and remove unused methodEsteban Küber-2/+2
2018-06-19Point to previous line for single expected tokenEsteban Küber-1/+20
2018-06-19Add message to `rustc_on_unimplemented` attributes in coreEsteban Küber-8/+0
2018-06-19Add code to incorrect `pub` restriction errorEsteban Küber-3/+4
2018-06-19Add code to `invalid ABI` errorEsteban Küber-5/+8
2018-06-19Do not consume semicolon twice while parsing local statementSeiichi Uchida-1/+1
2018-06-19Auto merge of #51278 - EPashkin:fix_mod_with_multilevel_paths_on_windows, ↵bors-1/+13
r=nikomatsakis Fix processing mod with multi-level path on Windows Fix error in [rustfmt](https://github.com/rust-lang-nursery/rustfmt/issues/1754) because libsyntax can not handle `mod` with multilevel path on Windows. Alternative is do almost same in https://github.com/rust-lang/rust/blob/master/src/libstd/sys/windows/fs.rs#L717 to allow work on paths with different separators, Ex. "\\\\?\\c:\\windows/temp"
2018-06-17Auto merge of #51549 - PSeitz:patch-1, r=kennytmbors-2/+2
Follow up to #51508, make parse_block public instead parse_block_expr This is an follow up to #51508 I mistakenly made parse_block_expr public instead of parse_block. This fixes this.
2018-06-16Follow up on https://github.com/rust-lang/rust/pull/51508, make parse_block ↵PSeitz-2/+2
public instead parse_block_expr This is an follow up to #51508 I mistakenly made parse_block_expr public instead of parse_block. This fixes this.
2018-06-14create multiple HIR items for a use statementQuietMisdreavus-1/+1
2018-06-12Rollup merge of #51502 - jebrosen:pub_parse_methods, r=Mark-SimulacrumMark Rousskov-2/+2
Make parse_seq_to_end and parse_path public (see SergioBenitez/Rocket#660, rust-lang/rust#51265) Rocket currently uses `parse_seq_to_end` and `parse_path` in its codegen macros. Assuming I tested correctly, this is the minimal set of methods that are currently necessary to build Rocket again. I would be happy to add documentation of this and Rocket's other usages, if desired.
2018-06-12Auto merge of #51508 - PSeitz:master, r=Mark-Simulacrumbors-2/+2
Make span_fatal and parse_block public span_fatal and parse_block were made private in #51265. These methods are used in stainless. Related #51498 #51504
2018-06-11Make span_fatal and parse_block publicPSeitz-2/+2
span_fatal and parse_block were made private in #51265. These methods are used in stainless. Related #51498 #51504
2018-06-11Make parse_seq_to_end and parse_path publicjeb-2/+2
2018-06-11Make parse_ident publicSeiichi Uchida-1/+1
2018-06-10Auto merge of #50205 - topecongiro:include-parens-to-type-parameter, ↵bors-8/+9
r=petrochenkov Include parens to type parameter The motivation of this PR is to fix a bug in rustfmt (cc https://github.com/rust-lang-nursery/rustfmt/issues/2630).
2018-06-10Simplify an error handling in the parserSeiichi Uchida-6/+2
2018-06-10Include parens to type parameterSeiichi Uchida-2/+7
2018-06-09Crate-ify and delete unused code in syntax::parseMark Simulacrum-234/+105
2018-06-09Auto merge of #51068 - Crazycolorz5:pluseqsplitting, r=petrochenkovbors-10/+44
parser: Split `+=` into `+` and `=` where `+` is explicitly requested (such as generics) Added functions in tokens to check whether a token leads with `+`. Used them when parsing to allow for token splitting of `+=` into `+` and `=`. Fixes https://github.com/rust-lang/rust/issues/47856
2018-06-08Rollup merge of #51099 - Crazycolorz5:expectedcloseparen, r=estebankMark Rousskov-2/+7
Fix Issue 38777 When looking through for a closing bracket in the loop condition, adds them to expecteds. https://github.com/rust-lang/rust/issues/38777
2018-06-07add an explanatory commentNiko Matsakis-0/+5
2018-06-06Auto merge of #51201 - estebank:dotdot, r=petrochenkovbors-69/+135
Accept `..` in incorrect position to avoid further errors We currently give a specific message when encountering a `..` anywhere other than the end of a pattern. Modify the parser to accept it (while still emitting the error) so that we don't also trigger "missing fields in pattern" errors afterwards. Add suggestions to either remove trailing `,` or moving the `..` to the end. Follow up to #49268.
2018-06-05Account for comma in suggestionEsteban Küber-1/+1
2018-06-05Improve diagnostics for incorrect `..` usageEsteban Küber-79/+135
When using `..` somewhere other than the end, parse the rest of the pattern correctly while still emitting an error. Add suggestions to either remove trailing `,` or moving the `..` to the end.
2018-06-05Accept `..` in incorrect position to avoid further errorsEsteban Küber-0/+10
We currently give a specific message when encountering a `..` anywhere other than the end of a pattern. Modify the parser to accept it (while still emitting the error) so that we don't also trigger "missing fields in pattern" errors afterwards.
2018-06-04Fixed indentation error.Crazycolorz5-2/+2
2018-06-04Fixed incorrect check_plus to token.is_like_plus.Crazycolorz5-1/+1
2018-06-04Tidy fixes.Crazycolorz5-5/+5
2018-06-04Added is_like_plus to token, and used that in place of equality comparison ↵Crazycolorz5-9/+22
to Plus token.
2018-06-04Implemented eat_plus and used it in parsing parse_ty_param_bounds_common.Crazycolorz5-1/+22
2018-06-01Suggest not mutably borrowing a mutable referenceYaron Tausky-20/+22
This commit is concerned with the case where the user tries to mutably borrow a mutable reference, thereby triggering an error. Instead of the existing suggestion to make the binding mutable, the compiler will now suggest to avoid borrowing altogether.
2018-06-01Fix processing mod with multi-level path on WindowsEvgenii Pashkin-1/+8
2018-06-01Add closing bracket expectation to sequences, modified appropriate test cases.Crazycolorz5-2/+7
2018-05-28Auto merge of #50724 - zackmdavis:applicability_rush, r=Manishearthbors-52/+140
add suggestion applicabilities to librustc and libsyntax A down payment on #50723. Interested in feedback on whether my `MaybeIncorrect` vs. `MachineApplicable` judgement calls are well-calibrated (and that we have a consensus on what this means). r? @Manishearth cc @killercup @estebank
2018-05-26Auto merge of #51072 - petrochenkov:ifield, r=eddybbors-2/+2
Use `Ident`s for fields in HIR Continuation of https://github.com/rust-lang/rust/pull/49718, part of https://github.com/rust-lang/rust/issues/49300
2018-05-26Add `Ident::as_str` helperVadim Petrochenkov-2/+2
2018-05-24restore emplacement syntax (obsolete)Niko Matsakis-0/+13
2018-05-24Auto merge of #51023 - kennytm:rollup, r=kennytmbors-8/+8
Rollup of 9 pull requests Successful merges: - #50864 (Add NetBSD/arm target specs) - #50956 (rust-gdb: work around the re-used -d argument in cgdb) - #50964 (Make sure that queries have predictable symbol names.) - #50965 (Update LLVM to pull in another wasm fix) - #50972 (Add -Z no-parallel-llvm flag) - #50979 (Fix span for type-only arguments) - #50981 (Shrink `LiveNode`.) - #50995 (move type out of unsafe block) - #51011 ( rustdoc: hide macro export statements from docs) Failed merges: