Skip to content

Feature idea: Visual linkage between original C and English explanation #17

@levincozza

Description

@levincozza

Hey, thanks for building this tool, it's been really useful.

I had an idea while using the tool:

  • Alongside the english translation highlighting, showing the original C code highlighted by token type as well would be really cool, and bridge the gap between the declarations they put in, and the english they get out. (Visual explanation in the mockup image below)
  • Ability to hover tokens of either original C code, or english translation, and it would underline both the token and the corresponding english translation. (Depicted by the red arrows)

Here's a quick mockup of what I mean:
colored mockup example

I don't write in Rust, so I'm not sure what the best implementation path would be, and am not confident in sending a PR with this feature. But from looking at the repo, it seems like it might be possible by storing the spans from the parser and reusing the highlighting system. Of course, you'd know best how/if to implement this. I just thought I'd share the idea in case it's useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions