-
Notifications
You must be signed in to change notification settings - Fork 237
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
Supporting incremental parsing and additional features in the IDE protocol in support of fstar-vscode-assistant #2853
Merged
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
6352f69
Parsing declarations incrementally, in support of the vscode interact…
nikswamy 3eb4d75
make boot; a quick way to rebuild just fstar.exe during development
nikswamy db8bbbe
Comparing AST.decl for equality, while ignoring ranges; used for incr…
nikswamy 23d4113
Generated files for incremental parser tests
nikswamy 0c52126
propagating AST syntax change
nikswamy 539f8c9
Supporting a new full-buffer message in the IDE protocol, used by fst…
nikswamy 2c58831
merging master in
nikswamy 45fb20f
a test for the full-buffer IDE message
nikswamy d7e2988
supporting vscode symbol resolution on hover; and status queries on t…
nikswamy a8739fb
reset gensym in incremental parsing; implement parser decl equality o…
nikswamy 6086ec4
only echo back symbol-range in symbol lookups rather than including n…
nikswamy cf1ef5a
fix file permissions in generated snapshot
nikswamy fcf8e51
a Callback query entry to enable instrumenting the repl with progress…
nikswamy cc4ef0b
report failure messages on full-buffer fragments too
nikswamy 0e1c81f
a code formatting command in the IDE protocol
nikswamy a8afe59
adding a command to reload-deps; preparing for handling a Cancel request
nikswamy 857a568
Recording the raw document content to echo back in incremental IDE re…
nikswamy 22fe314
merge with master
aseemr 0885545
Const_reify syntax change
aseemr 5fcec9d
snap
aseemr ff030ad
fixing an off by 1 error
aseemr 64eb234
snap
aseemr 290ed4f
Revert "fixing an off by 1 error"
aseemr e00948a
Revert "snap"
aseemr 60bd9aa
support verify and lax to a point
nikswamy 09e3e4d
merging
nikswamy ec20301
try fix off-by-one in ParseIt
nikswamy 78ee2d0
snap
nikswamy a7c7f78
handle cases where the file does not end with a new line
nikswamy 537983c
Merge branch 'nik_fstar-vscode-assistant' of github.com:FStarLang/FSt…
nikswamy cd233a8
better handling of ReloadDeps; and better handling of file that do no…
nikswamy fc21744
snap
nikswamy a1db6a2
Add a few code comments
nikswamy cf23b66
echo back the search term in auto-completion requests, for correlatio…
nikswamy fde74c9
Merge remote-tracking branch 'origin/master' into nik_fstar-vscode-as…
nikswamy f0cb3ed
update emacs test cases to account for echoed search term in auto-com…
nikswamy 34addfc
a missing type promotion in the the id_info_map: perhaps a cause of a…
nikswamy f5b4961
pushing the symbol lookups when checking full-buffer fragments to pre…
nikswamy d670ceb
merging master in
nikswamy 0344ab7
collecting more names from terms for symbol lookup
nikswamy 9671613
revert a couple of needless changes
nikswamy 81ac274
symbols for all decls
nikswamy 3e036df
some more fine-tuning & simplifcation of raw contents of a buffer in …
nikswamy 57b5b20
snap
nikswamy 754a6d8
classes have delimited syntax (thanks guido); do not fail when lookup…
nikswamy b767e7f
run the incremental IDE protocol on all files in ulib from test-incre…
nikswamy 591c35d
update test case
nikswamy 55bf677
Record any warnings raised on a checked fragment so it can be replaye…
nikswamy 8292f2e
fix a bug in AST comparison that was ignoring binder qualifiers and a…
nikswamy 462c531
remove some debug info
nikswamy 037e5e8
merging master in
nikswamy 1b25ea1
snap
nikswamy 9c82c5a
send back digests rather than full code in fragment-ok messages
nikswamy 881f40a
add full-buffer-start and finished messages; separate with_symbols fr…
nikswamy 269e810
fix incremental test suite oracle; do not fail on lookup failures
nikswamy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module U = FStar_Compiler_Util | ||
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 new .mli file for ParseIt, to improve incrementality for the dune build |
||
open FStar_Errors | ||
open FStar_Syntax_Syntax | ||
open Lexing | ||
open FStar_Sedlexing | ||
module Codes = FStar_Errors_Codes | ||
|
||
type filename = string | ||
|
||
type input_frag = { | ||
frag_fname:filename; | ||
frag_text:string; | ||
frag_line:Prims.int; | ||
frag_col:Prims.int | ||
} | ||
|
||
val read_vfs_entry : string -> (U.time * string) option | ||
val add_vfs_entry: string -> string -> unit | ||
val get_file_last_modification_time: string -> U.time | ||
|
||
type parse_frag = | ||
| Filename of filename | ||
| Toplevel of input_frag | ||
| Incremental of input_frag | ||
| Fragment of input_frag | ||
|
||
type parse_error = (Codes.raw_error * string * FStar_Compiler_Range.range) | ||
|
||
type code_fragment = { | ||
range : FStar_Compiler_Range.range; | ||
code: string; | ||
} | ||
|
||
type parse_result = | ||
| ASTFragment of (FStar_Parser_AST.inputFragment * (string * FStar_Compiler_Range.range) list) | ||
| IncrementalFragment of ((FStar_Parser_AST.decl * code_fragment) list * (string * FStar_Compiler_Range.range) list * parse_error option) | ||
| Term of FStar_Parser_AST.term | ||
| ParseError of parse_error | ||
|
||
val parse: parse_frag -> parse_result | ||
|
||
val find_file: string -> string | ||
|
||
val parse_warn_error: string -> Codes.error_setting list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Exposing an OCaml API to check if input is available to read on stdin