Skip to content

Commit ac297ba

Browse files
Scheme: Added missing special keywords (#2304)
1 parent 10f4327 commit ac297ba

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

components/prism-scheme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Prism.languages.scheme = {
1818
lookbehind: true
1919
},
2020
'keyword': {
21-
pattern: /(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,
21+
pattern: /(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s])/,
2222
lookbehind: true
2323
},
2424
'builtin': {

components/prism-scheme.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/languages/scheme/keyword_feature.test

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
(define)
2-
(define-syntax)
32
(define-library)
3+
(define-macro)
4+
(define-syntax)
45
(define-values)
6+
(defmacro)
57
(case-lambda)
68
(lambda)
79
(let)
@@ -22,14 +24,19 @@
2224
(quasi-quote)
2325
(quote)
2426
(syntax-rules)
27+
(syntax-case)
28+
(letrec-syntax)
29+
(let-syntax)
2530

2631
----------------------------------------------------
2732

2833
[
2934
["punctuation", "("], ["keyword", "define"], ["punctuation", ")"],
30-
["punctuation", "("], ["keyword", "define-syntax"], ["punctuation", ")"],
3135
["punctuation", "("], ["keyword", "define-library"], ["punctuation", ")"],
36+
["punctuation", "("], ["keyword", "define-macro"], ["punctuation", ")"],
37+
["punctuation", "("], ["keyword", "define-syntax"], ["punctuation", ")"],
3238
["punctuation", "("], ["keyword", "define-values"], ["punctuation", ")"],
39+
["punctuation", "("], ["keyword", "defmacro"], ["punctuation", ")"],
3340
["punctuation", "("], ["keyword", "case-lambda"], ["punctuation", ")"],
3441
["punctuation", "("], ["keyword", "lambda"], ["punctuation", ")"],
3542
["punctuation", "("], ["keyword", "let"], ["punctuation", ")"],
@@ -49,7 +56,10 @@
4956
["punctuation", "("], ["keyword", "set!"], ["punctuation", ")"],
5057
["punctuation", "("], ["keyword", "quasi-quote"], ["punctuation", ")"],
5158
["punctuation", "("], ["keyword", "quote"], ["punctuation", ")"],
52-
["punctuation", "("], ["keyword", "syntax-rules"], ["punctuation", ")"]
59+
["punctuation", "("], ["keyword", "syntax-rules"], ["punctuation", ")"],
60+
["punctuation", "("], ["keyword", "syntax-case"], ["punctuation", ")"],
61+
["punctuation", "("], ["keyword", "letrec-syntax"], ["punctuation", ")"],
62+
["punctuation", "("], ["keyword", "let-syntax"], ["punctuation", ")"]
5363
]
5464

5565
----------------------------------------------------

0 commit comments

Comments
 (0)