jackfirth / jackfirth/resyntax
Refactor `~and` with literal to colon notation
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 70
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
I recently learned that in syntax-parse, literals can be used with colon notation just like syntax classes. There ought to be a refactoring rule for this since I'm sure it's come up in tons of macros I've written. Note that implementing this requires #369 to work properly.
#lang resyntax/test
--------------------
#lang racket
(require syntax/parse)
(syntax-parse #'void
#:literals (void)
[(~and void-id void)
#'void-id])
--------------------
--------------------
#lang racket
(require syntax/parse)
(syntax-parse #'void
#:literals (void)
[void-id:void
#'void-id])
--------------------
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides no file or test path; start with its syntax-parse example and confirm prerequisite issue #369 works correctly. Locate the existing refactoring-rule conventions, then verify that the shown ~and-with-literal form is transformed to the equivalent colon notation without changing behavior.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100