Skip to content

Commit 7d740c4

Browse files
Scheme: Use standard char token (#3254)
1 parent a7bb300 commit 7d740c4

File tree

6 files changed

+87
-108
lines changed

6 files changed

+87
-108
lines changed

components/prism-scheme.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
pattern: /'[^()\[\]#'\s]+/,
1515
greedy: true
1616
},
17-
'character': {
17+
'char': {
1818
pattern: /#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,
19-
greedy: true,
20-
alias: 'string'
19+
greedy: true
2120
},
2221
'lambda-parameter': [
2322
// https://www.cs.cmu.edu/Groups/AI/html/r4rs/r4rs_6.html#SEC30

components/prism-scheme.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#\a ; lowercase letter
2+
#\A ; uppercase letter
3+
#\( ; left parenthesis
4+
#\space ; the space character
5+
#\newline ; the newline character
6+
7+
#\c-a ; Control-a
8+
#\meta-b ; Meta-b
9+
#\c-s-m-h-a ; Control-Meta-Super-Hyper-A
10+
11+
#\; #\' #\"
12+
13+
#\u0041
14+
#\x10FFFF
15+
#\λ
16+
#\)
17+
18+
----------------------------------------------------
19+
20+
[
21+
["char", "#\\a"], ["comment", "; lowercase letter"],
22+
["char", "#\\A"], ["comment", "; uppercase letter"],
23+
["char", "#\\("], ["comment", "; left parenthesis"],
24+
["char", "#\\space"], ["comment", "; the space character"],
25+
["char", "#\\newline"], ["comment", "; the newline character"],
26+
27+
["char", "#\\c-a"], ["comment", "; Control-a"],
28+
["char", "#\\meta-b"], ["comment", "; Meta-b"],
29+
["char", "#\\c-s-m-h-a"], ["comment", "; Control-Meta-Super-Hyper-A"],
30+
31+
["char", "#\\;"], ["char", "#\\'"], ["char", "#\\\""],
32+
33+
["char", "#\\u0041"],
34+
["char", "#\\x10FFFF"],
35+
["char", "#\\λ"],
36+
["char", "#\\)"]
37+
]
38+
39+
----------------------------------------------------
40+
41+
Checks for character literals.

tests/languages/racket/character_feature.test

-51
This file was deleted.
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#\a ; lowercase letter
2+
#\A ; uppercase letter
3+
#\( ; left parenthesis
4+
#\space ; the space character
5+
#\newline ; the newline character
6+
7+
#\c-a ; Control-a
8+
#\meta-b ; Meta-b
9+
#\c-s-m-h-a ; Control-Meta-Super-Hyper-A
10+
11+
#\; #\' #\"
12+
13+
#\u0041
14+
#\x10FFFF
15+
#\λ
16+
#\)
17+
#\💩
18+
19+
----------------------------------------------------
20+
21+
[
22+
["char", "#\\a"], ["comment", "; lowercase letter"],
23+
["char", "#\\A"], ["comment", "; uppercase letter"],
24+
["char", "#\\("], ["comment", "; left parenthesis"],
25+
["char", "#\\space"], ["comment", "; the space character"],
26+
["char", "#\\newline"], ["comment", "; the newline character"],
27+
28+
["char", "#\\c-a"], ["comment", "; Control-a"],
29+
["char", "#\\meta-b"], ["comment", "; Meta-b"],
30+
["char", "#\\c-s-m-h-a"], ["comment", "; Control-Meta-Super-Hyper-A"],
31+
32+
["char", "#\\;"], ["char", "#\\'"], ["char", "#\\\""],
33+
34+
["char", "#\\u0041"],
35+
["char", "#\\x10FFFF"],
36+
["char", "#\\λ"],
37+
["char", "#\\)"],
38+
["char", "#\\💩"]
39+
]
40+
41+
----------------------------------------------------
42+
43+
Checks for character literals.

tests/languages/scheme/character_feature.test

-53
This file was deleted.

0 commit comments

Comments
 (0)