-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some fixes #137
base: master
Are you sure you want to change the base?
Some fixes #137
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -867,7 +867,7 @@ allows composition in code comments." | |
'("open" "module" "include" "friend" | ||
"let" "let rec" "val" "and" "assume" | ||
"exception" "effect" "new_effect" "sub_effect" "new_effect_for_free" "layered_effect" | ||
"kind" "type" "class" "instance")) | ||
"kind" "type" "class" "instance" "%splice")) | ||
|
||
(defconst fstar-syntax-fsdoc-keywords | ||
'("@author" "@summary")) | ||
|
@@ -890,7 +890,7 @@ allows composition in code comments." | |
"Regexp matching block headers.") | ||
|
||
(defconst fstar-syntax-block-start-re | ||
(format "^\\(?:%s[ \n]\\)*\\(\\[@\\|%s \\)" | ||
(format "^\\(?:%s[ \n]\\)*\\(\\[@\\|%s\\_>\\)" | ||
(regexp-opt fstar-syntax-qualifiers) | ||
(regexp-opt (append (remove "and" fstar-syntax-headers) | ||
fstar-syntax-preprocessor))) | ||
|
@@ -1123,7 +1123,7 @@ leads to the binder's start." | |
(defun fstar-find-subtype-annotation (bound) | ||
"Find {...} group between point and BOUND." | ||
(let ((found) (end)) | ||
(while (and (not found) (re-search-forward "{[^:].*}" bound t)) | ||
(while (and (not found) (re-search-forward "{[^:|].*}" bound t)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know enough about the syntax to comment on this |
||
(setq end (save-excursion | ||
(goto-char (match-beginning 0)) | ||
(ignore-errors (forward-sexp)) | ||
|
@@ -1167,6 +1167,8 @@ leads to the binder's start." | |
(,(concat "\\_<\\(val\\) +\\(" id "\\) *:") | ||
(1 'fstar-structure-face) | ||
(2 'font-lock-function-name-face)) | ||
(, "%splice" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for |
||
(0 'fstar-structure-face)) | ||
(,(fstar--fl-conditional-matcher fstar-syntax-block-header-re #'fstar--in-code-p) | ||
(0 'fstar-structure-face prepend)) | ||
(fstar-find-id-with-type | ||
|
@@ -3495,6 +3497,14 @@ into blocks; process it as one large block instead." | |
(let ((fstar-subp--lax t)) | ||
(fstar-subp-advance-or-retract-to-point arg))) | ||
|
||
(defun fstar-subp-advance-to-point-max (&optional arg) | ||
"Like `fstar-subp-advance-or-retract-to-point' on `point-max'. | ||
Pass ARG to `fstar-subp-advance-or-retract-to-point'." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you refactor the function below to use this new one? |
||
(interactive "P") | ||
(fstar--widened-excursion | ||
(goto-char (point-max)) | ||
(fstar-subp-advance-or-retract-to-point arg))) | ||
|
||
(defun fstar-subp-advance-to-point-max-lax (&optional arg) | ||
"Like `fstar-subp-advance-or-retract-to-point' on `point-max', in lax mode. | ||
Pass ARG to `fstar-subp-advance-or-retract-to-point'." | ||
|
@@ -5231,6 +5241,7 @@ Last argument must be a file name, not %S" err-header fname)) | |
(user-error "%s | ||
First argument must be an F* executable, not %S" err-header executable)) | ||
(with-current-buffer (find-file-existing fname) | ||
(setq-local fstar-executable executable) | ||
(setq-local fstar-subp-prover-args args) | ||
(setq-local fstar-subp--default-directory command-line-default-directory) | ||
(message "\ | ||
|
@@ -5323,6 +5334,7 @@ This is useful to spot discrepancies between the CLI and IDE frontends." | |
("C-c C-l" "C-S-l" fstar-subp-advance-or-retract-to-point-lax) | ||
("C-c C-." "C-S-." fstar-subp-goto-beginning-of-unprocessed-region) | ||
("C-c C-b" "C-S-b" fstar-subp-advance-to-point-max-lax) | ||
("C-c C-g" "C-S-g" fstar-subp-advance-to-point-max) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A keybinding ending in C-g is going to be very very confusing, because |
||
("C-c C-r" "C-S-r" fstar-subp-reload-to-point) | ||
("C-c C-x" "C-M-c" fstar-subp-kill-one-or-many) | ||
("C-c C-c" "C-M-S-c" fstar-subp-interrupt)) | ||
|
@@ -5412,6 +5424,8 @@ This is useful to spot discrepancies between the CLI and IDE frontends." | |
fstar-subp-advance-or-retract-to-point] | ||
["Typecheck everything up to point (lax)" | ||
fstar-subp-advance-or-retract-to-point-lax] | ||
["Typecheck whole buffer" | ||
fstar-subp-advance-to-point-max] | ||
["Typecheck whole buffer (lax)" | ||
fstar-subp-advance-to-point-max-lax] | ||
["Reload dependencies and re-typecheck up to point" | ||
|
@@ -5488,6 +5502,7 @@ its `find-image' forms." | |
(define-key-after map [basic-actions-sep] '(menu-item "--")) | ||
(add-item 'fstar-subp-advance-next "next") | ||
(add-item 'fstar-subp-advance-next-lax "next-lax") | ||
(add-item 'fstar-subp-advance-to-point-max "goto-end") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a corresponding picture in the repo already? |
||
(add-item 'fstar-subp-advance-to-point-max-lax "goto-end-lax") | ||
(add-item 'fstar-subp-reload-to-point "reload") | ||
(define-key-after map [views-sep] '(menu-item "--")) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add this here if you also add it below?