Skip to content

Switch rustdoc from lexer::StringReader to rustc_lexer #75619

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
matklad opened this issue Aug 17, 2020 · 5 comments · Fixed by #76166
Closed

Switch rustdoc from lexer::StringReader to rustc_lexer #75619

matklad opened this issue Aug 17, 2020 · 5 comments · Fixed by #76166
Assignees
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@matklad
Copy link
Member

matklad commented Aug 17, 2020

In #75528, we would like to tweak the structure of the tokens rustc uses. One of the components which heavily depends on the current structure is rustdoc (html and check_code_block_syntax module use lexer::StringReader).

I think, for this issue and in general, it makes sense to switch rustdoc over to rustc_lexer, which produces lower-level guaranteed lossless tokens, which look like a better fit for the task of syntax highlighting.

I plan to do this refactor myself, but I want to check with @rust-lang/rustdoc if this is a good idea.

EDIT: cc #63284

@matklad matklad added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 17, 2020
@Manishearth
Copy link
Member

sgtm

@matklad matklad self-assigned this Aug 17, 2020
@GuillaumeGomez
Copy link
Member

I'm fine with it as well. :)

@matklad
Copy link
Member Author

matklad commented Aug 20, 2020

BTW, is there some chat room for rustdoc team on zulip on discord? I'd like to ask some questions :)

@GuillaumeGomez
Copy link
Member

There is one on discord (simply called "rustdoc").

@jyn514
Copy link
Member

jyn514 commented Aug 20, 2020

It's linked at https://www.rust-lang.org/governance/teams/dev-tools#rustdoc (which is I agree pretty hard to find).

Also the text there is wrong and mentions docs.rs, we should probably fix that.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants