-
-
Notifications
You must be signed in to change notification settings - Fork 97
Automated Resyntax fixes #745
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7e356e0
Fix 5 occurrences of `let-to-define`
resyntax-ci[bot] 810b5dc
Fix 1 occurrence of `display-and-newline-to-displayln`
resyntax-ci[bot] c55f3af
Fix 3 occurrences of `cond-let-to-cond-define`
resyntax-ci[bot] 64ea469
Fix 2 occurrences of `map-to-for`
resyntax-ci[bot] 639e28a
Fix 2 occurrences of `for-each-to-for`
resyntax-ci[bot] 8478c80
Fix 1 occurrence of `if-begin-to-cond`
resyntax-ci[bot] e513950
Fix 3 occurrences of `hash-for-each-to-for`
resyntax-ci[bot] 171b505
Fix 2 occurrences of `if-let-to-cond`
resyntax-ci[bot] 7de09db
Fix 1 occurrence of `flat-contract-migration`
resyntax-ci[bot] 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -804,11 +804,11 @@ | |
| ; break-after | ||
| (case-lambda | ||
| [(top-mark ccm val) | ||
| (let* ([debug-marks (continuation-mark-set->list ccm debug-key)]) | ||
| (car (send (get-tab) suspend | ||
| oeh | ||
| (cons top-mark debug-marks) | ||
| (list 'exit-break val))))] | ||
| (define debug-marks (continuation-mark-set->list ccm debug-key)) | ||
| (car (send (get-tab) suspend | ||
| oeh | ||
| (cons top-mark debug-marks) | ||
| (list 'exit-break val)))] | ||
| [(top-mark ccm . vals) | ||
| (define debug-marks (continuation-mark-set->list ccm debug-key)) | ||
| (apply values | ||
|
|
@@ -1237,37 +1237,37 @@ | |
| (send variables-text end-edit-sequence)) | ||
|
|
||
| (define/public (register-stack-frames frames already-stopped?) | ||
| (let* ([trimmed-exprs | ||
| (map (lambda (frame) | ||
| (let ([expr (mark-source frame)]) | ||
| (cond | ||
| ; should succeed unless the user closes a secondary tab during debugging | ||
| [(and expr (filename->defs (syntax-source expr))) | ||
| => (lambda (defs) | ||
| (trim-expr-str | ||
| (if (syntax-position expr) | ||
| (send defs get-text | ||
| (sub1 (syntax-position expr)) | ||
| (+ -1 (syntax-position expr) (syntax-span expr))) | ||
| "??") | ||
| 15))] | ||
| ["??"]))) | ||
| frames)] | ||
| [trimmed-lengths (map add1 (map string-length trimmed-exprs))] | ||
| [positions (foldl + 0 trimmed-lengths)]) | ||
| (send stack-frames begin-edit-sequence) | ||
| (send stack-frames lock #f) | ||
| (unless already-stopped? | ||
| (send stack-frames delete 0 (send stack-frames last-position)) | ||
| (for-each (lambda (trimmed-expr) | ||
| (send stack-frames insert (format "~a\n" trimmed-expr))) | ||
| trimmed-exprs)) | ||
| (send stack-frames change-style normal-sd 0 (send stack-frames last-position)) | ||
| (send stack-frames change-style bold-sd | ||
| (send stack-frames paragraph-start-position (send (get-current-tab) get-frame-num)) | ||
| (send stack-frames paragraph-end-position (send (get-current-tab) get-frame-num))) | ||
| (send stack-frames lock #t) | ||
| (send stack-frames end-edit-sequence))) | ||
| (define trimmed-exprs | ||
| (map (lambda (frame) | ||
| (let ([expr (mark-source frame)]) | ||
| (cond | ||
| ; should succeed unless the user closes a secondary tab during debugging | ||
| [(and expr (filename->defs (syntax-source expr))) | ||
| => | ||
| (lambda (defs) | ||
| (trim-expr-str (if (syntax-position expr) | ||
| (send defs get-text | ||
| (sub1 (syntax-position expr)) | ||
| (+ -1 (syntax-position expr) (syntax-span expr))) | ||
| "??") | ||
| 15))] | ||
| ["??"]))) | ||
| frames)) | ||
| (define trimmed-lengths (map add1 (map string-length trimmed-exprs))) | ||
|
Member
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. looks like |
||
| (foldl + 0 trimmed-lengths) | ||
| (send stack-frames begin-edit-sequence) | ||
| (send stack-frames lock #f) | ||
| (unless already-stopped? | ||
| (send stack-frames delete 0 (send stack-frames last-position)) | ||
| (for-each (lambda (trimmed-expr) (send stack-frames insert (format "~a\n" trimmed-expr))) | ||
| trimmed-exprs)) | ||
| (send stack-frames change-style normal-sd 0 (send stack-frames last-position)) | ||
| (send stack-frames change-style | ||
| bold-sd | ||
| (send stack-frames paragraph-start-position (send (get-current-tab) get-frame-num)) | ||
| (send stack-frames paragraph-end-position (send (get-current-tab) get-frame-num))) | ||
| (send stack-frames lock #t) | ||
| (send stack-frames end-edit-sequence)) | ||
|
|
||
| (define/public (clear-stack-frames/vars) | ||
| (send stack-frames begin-edit-sequence) | ||
|
|
@@ -1561,19 +1561,24 @@ | |
| (inner (void) on-tab-change old new)) | ||
|
|
||
| (define/public (check-current-language-for-debugger) | ||
| (let* ([settings (send (get-definitions-text) get-next-settings)] | ||
| [lang (drscheme:language-configuration:language-settings-language settings)] | ||
| [visible? (and (send lang capability-value 'gui-debugger:debug-button) | ||
| (not (is-a? lang drscheme:module-language:module-language<%>)) ;; the opt-out button handles this language | ||
| (not (debugger-does-not-work-for? | ||
| (extract-language-level settings))))]) | ||
| (define debug-parent (send debug-button get-parent)) | ||
| (define debug-button-currently-visible? (member debug-button (send debug-parent get-children))) | ||
| (if visible? | ||
| (unless debug-button-currently-visible? | ||
| (send debug-parent add-child debug-button)) | ||
| (when debug-button-currently-visible? | ||
| (send debug-parent delete-child debug-button))))) | ||
| (define settings (send (get-definitions-text) get-next-settings)) | ||
| (define lang (drscheme:language-configuration:language-settings-language settings)) | ||
| (define visible? | ||
| (and | ||
| (send lang capability-value 'gui-debugger:debug-button) | ||
| (not | ||
| (is-a? | ||
| lang | ||
| drscheme:module-language:module-language<%>)) ;; the opt-out button handles this language | ||
| (not (debugger-does-not-work-for? (extract-language-level settings))))) | ||
| (define debug-parent (send debug-button get-parent)) | ||
| (define debug-button-currently-visible? | ||
| (member debug-button (send debug-parent get-children))) | ||
| (if visible? | ||
| (unless debug-button-currently-visible? | ||
| (send debug-parent add-child debug-button)) | ||
| (when debug-button-currently-visible? | ||
| (send debug-parent delete-child debug-button)))) | ||
|
|
||
| (send (get-button-panel) change-children | ||
| (lambda (children) | ||
|
|
||
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.
this doesn't seem good.
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.
@sorawee is this your department?
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.
Yes :/. This particular instance should be easy to fix.