Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Add set text analyser for Coq lexer #19

Merged
merged 1 commit into from
Nov 11, 2020
Merged

Conversation

gandarez
Copy link
Member

@gandarez gandarez commented Nov 9, 2020

This PR ports pygments Coq text analysis to chroma/go. Original code can be found at: https://github.com/pygments/pygments/blob/master/pygments/lexers/theorem.py#L156

In the current pygments analysis the actual value for completing a proof is Qed but also qed can appear on it. So I applied a regex to validate it. Also opened a PR to fix it on Pygments.

https://coq.inria.fr/refman/proof-engine/proof-handling.html?highlight=qed#coq:cmd.qed
https://coq.inria.fr/refman/proof-engine/tactics.html#coq:tacn.tauto

Fixes: wakatime/wakatime-cli#93

@gandarez gandarez added the enhancement New feature or request label Nov 9, 2020
Copy link

@dron22 dron22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just mind your PR descriptions here and in pygments PR. The order of Qed and qed has to be the other way around. Should be:

The current Coq analysis the actual value for completing a proof is `qed` but also `Qed` can appear on it. So I applied a regex to validate it.

@gandarez
Copy link
Member Author

LGTM. Just mind your PR descriptions here and in pygments PR. The order of Qed and qed has to be the other way around. Should be:

The current Coq analysis the actual value for completing a proof is `qed` but also `Qed` can appear on it. So I applied a regex to validate it.

Actually what's in the documentation is Qed but qed can also appear. The regex is [qQ]ed.

@gandarez gandarez merged commit 0e7060d into master Nov 11, 2020
@gandarez gandarez deleted the coq-lexer-text-analysis branch November 11, 2020 12:11
dron22 pushed a commit that referenced this pull request Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Chroma] Add text analyzer for Coq and Verilog
2 participants