This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/coq/coq_test
Xia Li-yao 56f463e893
coq: Add some common keywords and improve recognition of Set and qualified identifiers (#2158)
. is not an operator in Coq: in this specific usage, it is only meant to build a qualified name, so this rule really corresponds to a proper lexical rule in Coq

Unlike most languages, Coq has a large set of special words that are not reserved: they may still be used as identifiers. For example Prop is a special word, which currently gets highlighted as such in Equations.Prop.Equations, but it should be recognized as a regular name there. Because of how flexible the syntax of Coq is, it's not straightforward to disambiguate things with just a bunch of regexes, so we have to rely on heuristics. Skipping qualified names from being recognized as keywords is an easy win.
2022-06-11 15:41:14 +02:00

12 lines
366 B
Text

From Coq Require Import Arith.
Require Import Equations.Prop.Equations.
Set Implicit Arguments.
Set Primitive Projections.
Unset Printing All.
Scheme tree_forest_rec := Induction for tree Sort Set
with forest_tree_rec := Induction for forest Sort Set.
Fail Definition x : unit := 3.
admit.
Equations? neg (b : bool) : bool :=
neg true := false;
neg false := true.