about summary refs log tree commit diff
path: root/src/librustdoc/html/highlight.rs
AgeCommit message (Collapse)AuthorLines
2018-03-17syntax: Make `_` an identifierVadim Petrochenkov-1/+1
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-3/+3
2017-11-06tweak notes on ignore/compile_fail examplesQuietMisdreavus-1/+1
2017-09-22Add support for `..=` syntaxAlex Burka-3/+3
Add ..= to the parser Add ..= to libproc_macro Add ..= to ICH Highlight ..= in rustdoc Update impl Debug for RangeInclusive to ..= Replace `...` to `..=` in range docs Make the dotdoteq warning point to the ... Add warning for ... in expressions Updated more tests to the ..= syntax Updated even more tests to the ..= syntax Updated the inclusive_range entry in unstable book
2017-09-11Add arrow and improve displayGuillaume Gomez-9/+2
2017-09-11Add class for codeblocksGuillaume Gomez-2/+15
2017-08-29Rollup merge of #43918 - mystor:rustdoc-pound, r=QuietMisdreavusAriel Ben-Yehuda-15/+43
Don't highlight # which does not start an attribute in rustdoc Currently when we highlight some macros for rustdoc (e.g. `quote!` from https://github.com/dtolnay/quote), we get really bad syntax highlighting, because we assume that every token between a `#` character and the next `]` in the source must be an attribute. This patch improves that highlighting behavior to instead only highlight after finding the `[` token after the `#` token. (NOTE: I've only run this patch against https://github.com/nrc/rustdoc-highlight so if it doesn't build on travis that's why - I don't have a recent rustc build on this laptop) I'm guessing r? @steveklabnik
2017-08-17Rollup merge of #43891 - Fourchaux:master, r=steveklabnikCorey Farwell-1/+1
Fix typos & us spellings Fixing some typos and non en-US spellings. (Update of PR https://github.com/rust-lang/rust/pull/42812 )
2017-08-16Don't highlight # which does not start an attribute in rustdocMichael Layzell-15/+43
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-2/+2
Like #43008 (f668999), but _much more aggressive_.
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-07-05Merge remote-tracking branch 'origin/master' into proc_macro_apiAlex Crichton-1/+1
2017-06-29Change some terminology around keywords and reserved identifierspetrochenkov-1/+1
2017-06-26Simplify `hygiene::Mark` application, andJeffrey Seyfried-1/+1
remove variant `Token::SubstNt` in favor of `quoted::TokenTree::MetaVar`.
2017-05-02Address reviewest31-1/+1
2017-05-02Removal pass for anonymous parametersest31-2/+6
Removes occurences of anonymous parameters from the rustc codebase, as they are to be deprecated. See issue #41686 and RFC 1685.
2017-04-26Implement a file-path remapping feature in support of debuginfo and ↵Michael Woerister-5/+5
reproducible builds.
2017-02-28Rollup merge of #39944 - GuillaumeGomez:associated-consts, r=frewsxcvCorey Farwell-3/+3
Improve associated constant rendering in rustdoc Before: <img width="1440" alt="screen shot 2017-02-19 at 00 30 51" src="https://cloud.githubusercontent.com/assets/3050060/23097697/caeed80e-f63a-11e6-98c2-5d27e4efd76d.png"> After: <img width="1440" alt="screen shot 2017-02-19 at 00 30 39" src="https://cloud.githubusercontent.com/assets/3050060/23097698/cfb4874e-f63a-11e6-80cf-ffbf5c5c6162.png"> cc @SergioBenitez r? @rust-lang/docs
2017-02-28Remove `Token::MatchNt`.Jeffrey Seyfried-1/+1
2017-02-28Apply the same transformation to every typesGuillaume Gomez-3/+3
2017-01-17Fix fallout in `rustdoc`.Jeffrey Seyfried-9/+7
2016-12-23Fix rustdoc highlighting of `&` and `*`.Chris Morgan-3/+5
Whitespace tokens were included, so the span check used with `&` was incorrect, and it was never highlighted as kw-2. The `*` in `*foo` and `*const T` should also be highlighted kw-2, so I added them. Note that this *will* cause mishighlighting of code like `1*2`, but that should have been written `1 * 2`. Same deal with `1&2`.
2016-10-19Improve `$crate`.Jeffrey Seyfried-3/+2
2016-10-12rustdoc: color the question mark operatorest31-2/+6
The idea was proposed by eddyb in: https://github.com/rust-lang/rust/issues/31436#issuecomment-247426582
2016-09-17duplicate theEitan Adler-1/+1
2016-09-08Set run button transparent instead of invisibleGuillaume Gomez-1/+5
2016-07-19Introduced `NoDelim` and modified the compiler to support it.cgswords-0/+1
2016-07-06Rollup merge of #34626 - sylvestre:master, r=ManishearthSteve Klabnik-1/+1
Fix typos
2016-07-03prefer `if let` to match with `None => {}` arm in some placesZack M. Davis-3/+2
This is a spiritual succesor to #34268/8531d581, in which we replaced a number of matches of None to the unit value with `if let` conditionals where it was judged that this made for clearer/simpler code (as would be recommended by Manishearth/rust-clippy's `single_match` lint). The same rationale applies to matches of None to the empty block.
2016-07-03Fix a few typos in the codeSylvestre Ledru-1/+1
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-1/+2
2016-06-16Add an abs_path member to FileMap, use it when writing debug info.Ted Mielczarek-2/+2
When items are inlined from extern crates, the filename in the debug info is taken from the FileMap that's serialized in the rlib metadata. Currently this is just FileMap.name, which is whatever path is passed to rustc. Since libcore and libstd are built by invoking rustc with relative paths, they wind up with relative paths in the rlib, and when linked into a binary the debug info uses relative paths for the names, but since the compilation directory for the final binary, tools trying to read source filenames will wind up with bad paths. We noticed this in Firefox with source filenames from libcore/libstd having bad paths. This change stores an absolute path in FileMap.abs_path, and uses that if available for writing debug info. This is not going to magically make debuggers able to find the source, but it will at least provide sensible paths.
2016-05-15true color, fixed boolval style in docHendrik Sollich-1/+1
2016-05-04rustdoc: refactor rustdoc syntax highlighting for a more flexible APINick Cameron-105/+245
Clients can now use the rustdoc syntax highlighter to classify tokens, then use that info to put together there own HTML (or whatever), rather than just having static HTML output.
2016-04-27Make some fatal lexer errors recoverablemitaa-7/+19
2016-04-24syntax: Get rid of token::IdentStyleVadim Petrochenkov-1/+1
2016-04-04rustdoc: factor out function for getting inner html of highlighted sourceNick Cameron-19/+42
2016-03-22fix alignmentJorge Aparicio-3/+2
2016-03-22try! -> ?Jorge Aparicio-12/+12
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2015-09-03Use consistent terminology for byte string literalsVadim Petrochenkov-1/+1
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-07-28remove `get_ident` and `get_name`, make `as_str` soundOliver Schneider-2/+2
2015-05-14syntax: replace sess.span_diagnostic.cm with sess.codemap().Eduard Burtescu-5/+3
2015-05-14syntax: refactor (Span)Handler and ParseSess constructors to be methods.Eduard Burtescu-1/+1
2015-03-13Fallout of std::old_io deprecationAlex Crichton-2/+3
2015-02-20Remove remaining uses of `[]`. This time I tried to use deref coercions ↵Niko Matsakis-1/+1
where possible.
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-1/+1
2015-02-06librustdoc has been updatedGuillaumeGomez-1/+1
Fixes run build error Fix test failure Fix tests' errors
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-4/+4
2015-02-04remove all kind annotations from closuresJorge Aparicio-1/+1
2015-01-26Fallout of io => old_ioAlex Crichton-2/+2