From 8ea28a559010ba874c67fd9a07d61b068f1b2e47 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Sun, 16 Aug 2020 20:01:39 +0300 Subject: [PATCH] Add "Role" column for #! syntax --- generate.scm | 9 +++++++-- hash-bang-syntax.scm | 11 +++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/generate.scm b/generate.scm index 73822e0..cba9ed4 100644 --- a/generate.scm +++ b/generate.scm @@ -218,8 +218,13 @@ "hash-bang-syntax" '(p) (tabulate - '("ID" "Description") - (map the-usual (sort-by-id (group-file 'id "hash-bang-syntax.scm")))))) + '("ID" "Role" "Description") + (map (lambda (entry) + (cons (assoc? 'class entry) + `((code ,(symbol->string (assoc1 'id entry))) + ,(symbol->string (assoc1 'role entry)) + ,(assoc1 'description entry)))) + (sort-by-id (group-file 'id "hash-bang-syntax.scm")))))) (define (filename-extension) (registry diff --git a/hash-bang-syntax.scm b/hash-bang-syntax.scm index 8c48932..f18df9e 100644 --- a/hash-bang-syntax.scm +++ b/hash-bang-syntax.scm @@ -1,32 +1,43 @@ (id bwp) +(role object) (description "broken-weak-pair object [Chez Scheme]") (id chezscheme) +(role directive) (description "change to Chez Scheme read syntax") (id eof) +(role object) (description "end-of-file object") (id fold-case) +(role directive) (description "change to case insensitive identifiers [R7RS]") (id key) +(role keyword) (description "start keyword arguments in lambda list [DSSSL]") (id no-fold-case) +(role directive) (description "change to case sensitive identifiers [R7RS]") (id optional) +(role keyword) (description "start optional arguments in lambda list [DSSSL]") (id r6rs) +(role directive) (description "change to R6RS read syntax [R6RS]") (id r7rs) +(role directive) (description "change to R7RS read syntax") (id rest) +(role keyword) (description "start rest argument in lambda list [DSSSL]") (id void) +(role object) (description "void object")