nixin72 / from-template

Raco tool for cloning templates from the racket-templates org
MIT License
8 stars 4 forks source link

new template: meta-reader #22

Closed dannypsnl closed 2 years ago

dannypsnl commented 2 years ago

I think this is worth having its own template since it's a bit complicated, a collection setup like this can help users write code like the following

#lang collection racket/base ; use racket/base with collection extension

We can even apply multiple meta-readers

#lang a b c racket/base

For reference can see

  1. https://github.com/dannypsnl/formatted-string
  2. https://github.com/AlexKnauth/exact-decimal-lang

Project structures

.
├── info.rkt
└── lang
    ├── language-info.rkt
    ├── reader.rkt
    └── runtime-config.rkt

This is a bit hard to define reader.rkt since it's not a normal racket file with #lang lang start line. Inside of it, the use of make-meta-reader hard to be correct.