about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer/mod.rs
AgeCommit message (Collapse)AuthorLines
2019-04-03make StringReader methods privateAleksey Kladov-2/+2
2019-04-03make StringReader fields privateAleksey Kladov-6/+6
2019-03-20Tweak incorrect escaped char diagnosticEsteban Küber-19/+19
2019-03-16syntax: Introduce `Ident::can_be_raw`Vadim Petrochenkov-8/+4
2019-03-13Rollup merge of #58876 - estebank:numeric-lifetime, r=petrochenkovMazdak Farrokhzad-3/+15
Parse lifetimes that start with a number and give specific error Fix #58786.
2019-03-09review commentsEsteban Küber-4/+4
2019-03-08Parse lifetimes that start with a number and give specific errorEsteban Küber-6/+18
2019-03-07Fix with_emitter callersEsteban Küber-1/+1
2019-02-16help suggestion when trying to delimit string literals with directed unicode ↵Patrick McCarter-0/+22
quotes #58436
2019-02-13Rollup merge of #58273 - taiki-e:rename-dependency, r=matthewjasperMazdak Farrokhzad-3/+2
Rename rustc_errors dependency in rust 2018 crates I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules. Related: rust-lang/cargo#5653 cc #58099 r? @Centril
2019-02-13Cleanup importsTaiki Endo-2/+2
2019-02-13Rename rustc_errors dependency in rust 2018 cratesTaiki Endo-2/+1
2019-02-10rustc: doc commentsAlexander Regueiro-6/+6
2019-02-07Deduplicate mismatched delimiter errorsEsteban Küber-0/+11
Delay unmatched delimiter errors until after the parser has run to deduplicate them when parsing and attempt recovering intelligently.
2019-02-07libsyntax => 2018Taiki Endo-16/+19
2019-01-26remove `_with_applicability` from suggestion fnsAndy Russell-2/+2
2019-01-20Auto merge of #56884 - euclio:codeblock-diagnostics, r=QuietMisdreavusbors-13/+0
rustdoc: overhaul code block lexing errors Fixes #53919. This PR moves the reporting of code block lexing errors from rendering time to an early pass, so we can use the compiler's error reporting mechanisms. This dramatically improves the diagnostics in this situation: we now de-emphasize the lexing errors as a note under a warning that has a span and suggestion instead of just emitting errors at the top level. Additionally, this PR generalizes the markdown -> source span calculation function, which should allow other rustdoc warnings to use better spans in the future. Last, the PR makes sure that the code block is always emitted in the docs, even if it fails to highlight correctly. Of note: - The new pass unfortunately adds another pass over the docs to gather the doc blocks for syntax-checking. I wonder if this could be combined with the pass that looks for testable blocks? I'm not familiar with that code, so I don't know how feasible that is. - `pulldown_cmark` doesn't make it easy to find the spans of the code blocks, so the code that calculates the spans is a little nasty. It works for all the test cases I threw at it, but I wouldn't be surprised if an edge case would break it. Should have a thorough review. - This PR worsens the state of #56885, since those certain fatal lexing errors are now emitted before docs get generated at all.
2019-01-20Revert changeYuki Okushi-3/+2
2019-01-20[WIP] Improve error behaviorYuki Okushi-6/+8
2019-01-18Continue chekingYuki Okushi-1/+1
2019-01-16Cancel processYuki Okushi-1/+1
2019-01-14rustdoc: check code block syntax in early passAndy Russell-13/+0
2019-01-11Continue evaluating after parsing incorrect binary literalEsteban Küber-1/+1
2018-12-31Do not use unicode character in diagnostic helpEsteban Küber-1/+1
2018-12-31Use structured suggestion for braceless unicode escape squenceEsteban Küber-6/+30
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-06Auto merge of #54517 - mcr431:53956-panic-on-include_bytes-of-own-file, ↵bors-1/+1
r=michaelwoerister 53956 panic on include bytes of own file fix #53956 When using `include_bytes!` on a source file in the project, compiler would panic on subsequent compilations because `expand_include_bytes` would overwrite files in the source_map with no source. This PR changes `expand_include_bytes` to check source_map and use the already existing src, if any.
2018-12-04adds DocTest filename variant, refactors doctest_offset out of source_map, ↵Matthew Russo-1/+1
fixes remaining test failures
2018-12-04Use iterator and pattern APIs instead of `char_at`Shotaro Yamada-17/+19
2018-11-26Update outdated code comments in StringReaderJason Langenauer-3/+2
2018-11-14Clean up some non-mod-rs stuff.Eric Huss-1/+0
2018-11-04Auto merge of #54861 - rep-nop:find_main_in_doctest, r=estebankbors-1/+22
rustdoc: Replaces fn main search and extern crate search with proper parsing during doctests. Fixes #21299. Fixes #33731. Let me know if there's any additional changes you'd like made!
2018-11-01buffer errors from initial tokenization when parsingQuietMisdreavus-1/+22
2018-10-29Rename other occs of (Code/File)Map to Source(Map/File) #51574David Lavati-54/+54
2018-09-29Add a sentence before rustc errorsGuillaume Gomez-1/+3
2018-09-29Improve error display for codeblocks in rustdocGuillaume Gomez-0/+11
2018-09-09Don't compute padding of braces unless they are unmatchedEsteban Küber-3/+3
2018-09-05Provide more context for unenclosed delimitersEsteban Küber-0/+5
* When encountering EOF, point at the last opening brace that does not have the same indentation level as its close delimiter. * When encountering the wrong type of close delimiter, point at the likely correct open delimiter to give a better idea of what went wrong.
2018-08-28Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.Eduard-Mihai Burtescu-3/+3
2018-08-19fix tidy errorsDonato Sciarra-6/+6
2018-08-19mv codemap source_mapDonato Sciarra-2/+2
2018-08-19mv codemap() source_map()Donato Sciarra-2/+2
2018-08-19mv (mod) codemap source_mapDonato Sciarra-2/+2
2018-08-19mv filemap source_fileDonato Sciarra-19/+19
2018-08-19mv FileMap SourceFileDonato Sciarra-5/+5
2018-08-19mv CodeMap SourceMapDonato Sciarra-18/+18
2018-08-17Rollup merge of #53373 - estebank:unclosed, r=petrochenkovkennytm-0/+2
Tweak unclosed delimiter parser error
2018-08-15Do not emit "incorrect close delimiter" twice in the same placeEsteban Küber-0/+2
2018-08-13A few cleanups and minor improvements for the lexerljedrz-67/+112