        (2 'font-lock-function-name-face))
       (,fstar-syntax-cs (0 'font-lock-constant-face))
       ("(\\*--\\(build-config\\)"
-       (1 'font-lock-preprocessor-face prepend)))))
+       (1 'font-lock-preprocessor-face prepend))
+      (,(concat "\\_<" fstar-syntax-id-unwrapped "\\(_[0-9]+\\)\\_>")
+       (1 '(face fstar-subscript-face display (raise -0.3)) append)))))
 
 (defun fstar-setup-font-lock ()
   "Setup font-lock for use with F*."

      (,fstar-syntax-structure    . 'fstar-structure-face)
      ,@fstar-syntax-additional)
     nil nil))
  (font-lock-set-defaults))

;;; Syntax table


  (goto-char (match-end rewind-to))
  (match-end (or bound-to 0)))

(defconst fstar-syntax-id-unwrapped (rx (? (or "#" "'"))
                                    (any "a-z_") (* (or wordchar (syntax symbol)))
                                    (? "." (* (or wordchar (syntax symbol))))))

(defconst fstar-syntax-id (concat "\\_<" fstar-syntax-id-unwrapped "\\_>"))

(defconst fstar-syntax-cs (rx symbol-start
                          (any "A-Z") (* (or wordchar (syntax symbol)))
