-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Well, I'm fixing Scheme-langserver's crashes nowadays and one of the most important approach is to catch 79 lines of rd-error like
(xcall rd-error #f #t "invalid string character \\~c~c~c" c c1 c2)In editor's general scenarios, properly processing them means fault tolerance technique to delete characters and preserve meaningful fragments in source codes as long as possible. For example, R7RS string "\123" may cause error and throw condition, and condition-irritants consists "invalid string character ...", #\\ character's position and other information. My current approach is to replace #\\ character with blank, so that other items in this altered source code will keep their position with origin and won't cause code editing inconsistent with language server indexing.
Here, my current approach is to step-by-step digest s/read.ss and patch downgrade rules to properly handle such rd-errors. And I want following helps:
- Is there any mature compatible solution with Chez's
s/read.ss? If there is, I can be free from dozen of hard workings. - Or, is there any theory publishes on "fault tolerant in lisp parser"? If there is, I can confirm that correctness my patch rules perform.
- Any other advises?
- Addition: apparently,
s/read.ssis not initially designed for fault tolerance, could I say that my patches can't reach the ultimate end, in which positionreadprocedure won't throw unknown errors.