             (up-list)
             (point))))
       (save-excursion
-        (forward-sexp)
+        (condition-case nil
+            (forward-sexp)
+          (error nil (forward-char)))
         (point))))
 
 (defun fstar-find-fun-and-args (bound)


(defconst fstar-syntax-additional
  (let ((id fstar-syntax-id))
    `((fstar-find-subtype-annotation
       ("\\({\\)\\(\\(?:.\\|\n\\)+\\)\\(}\\)"
        (fstar-group-pre-matcher 2 2) nil
        (1 'font-lock-type-face append)

  (electric-indent-mode -1))

(define-derived-mode fstar-mode prog-mode "F✪"
  :syntax-table fstar-syntax-table
  (fstar-setup-fontlock)
  (fstar-setup-prettify)
  (fstar-setup-indentation)
