Add filename-extension registry

This commit is contained in:
Lassi Kortela 2020-08-15 22:17:29 +03:00
parent 3d5c11add6
commit ccaac05b8a
2 changed files with 58 additions and 0 deletions

43
filename-extension.scm Normal file
View File

@ -0,0 +1,43 @@
(id ".scm")
(stands-for "Scheme")
(description "Source code for any implementation or standard")
(id ".sps")
(stands-for "Scheme program source")
(description "R6RS program")
(id ".sls")
(stands-for "Scheme library source")
(description "R6RS (library ...) form")
(id ".sld")
(stands-for "Scheme library definition")
(description "R7RS (define-library ...) form")
(id ".rkt")
(stands-for "Racket")
(description "Racket source code with #lang at the top")
(id ".scr")
(stands-for "Scribe")
(description "Text document written using Scheme Scribe")
(id ".scrbl")
(stands-for "Scribble")
(description "Text document written using Scribble")
(id ".ss")
(stands-for "Scheme source")
(description "Equivalent to .scm")
(id ".sc")
(stands-for "Scheme")
(description "Equivalent to .scm [rare]")
(id ".sch")
(stands-for "Scheme")
(description "Equivalent to .scm [rare]")
(id ".sps7")
(stands-for "Scheme program source")
(description "R7RS program [rare]")

View File

@ -221,6 +221,20 @@
'("ID" "Description")
(map the-usual (sort-by-id (group-file 'id "hash-bang-syntax.scm"))))))
(define (filename-extension)
(registry
"Filename extension"
"filename-extension"
'(p)
(tabulate
'("Extension" "Stands for" "Description")
(map (lambda (entry)
(cons (assoc? 'class entry)
`((code ,(assoc1 'id entry))
,(assoc1 'stands-for entry)
,(assoc1 'description entry))))
(group-file 'id "filename-extension.scm")))))
(define (foreign-status-set)
(registry
"Foreign status sets"
@ -298,6 +312,7 @@
,(character-name)
,(hash-syntax)
,(hash-bang-syntax)
,(filename-extension)
,(foreign-status-set)
,(foreign-status-property)))))