Skip to content

Commit

Permalink
No highlighting for numbers within identifiers. (RedPRL#463)
Browse files Browse the repository at this point in the history
* Merge parameter keywords into expression keywords.
* Hopefully fix the highlighting of numbers. Close RedPRL#434.
  • Loading branch information
favonia authored Nov 19, 2017
1 parent fa04b04 commit 0bb6c24
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions emacs/redprl.el
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@
'("dim" "hyp" "exp" "lvl" "tac" "triv" "jdg")
"RedPRL's built-in sorts.")

(defconst redprl-parameter-keywords
'("+" "++" "lmax")
"RedPRL's parameter keywords.")

(defconst redprl-expression-keywords
'("tv" "ax" "fcom"
"bool" "tt" "ff" "if" "wbool" "wool" "bool-rec" "wif"
Expand All @@ -128,11 +124,12 @@
"box" "cap"
"V" "Vin" "Vproj"
"universe" "U"
"hcom" "ghcom" "coe" "com" "gcom")
"hcom" "ghcom" "coe" "com" "gcom"
"lmax")
"RedPRL's expression keywords.")

(defconst redprl-expression-symbols
'("->" "~>" "<~" "$" "*" "!" "@" "=")
'("->" "~>" "<~" "$" "*" "!" "@" "=" "+" "++")
"RedPRL's expression symbols.")

(defconst redprl-tactic-keywords
Expand Down Expand Up @@ -188,10 +185,7 @@
(,(rx "#" (+ word)) 0 'redprl-metavar-face)

;; Numbers
(,(rx (? "-") (+ digit)) 0 'redprl-number-face)

;; Built-in parameters
(,(regexp-opt redprl-parameter-keywords 'words) 0 'redprl-expression-keyword-face)
(,(rx word-start (? "-") (+ digit)) 0 'redprl-number-face)

;; Built-in expressions
(,(regexp-opt redprl-expression-keywords 'words) 0 'redprl-expression-keyword-face)
Expand Down

0 comments on commit 0bb6c24

Please sign in to comment.