Skip to content

Commit 45f04f8

Browse files
AlexKnauthmflatt
authored andcommitted
lex hashalw reader literals
goes along with racket/racket#4236 which adds `equal-always?` and `hashalw` along with it
1 parent 4127d3c commit 45f04f8

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

syntax-color-lib/syntax-color/racket-lexer.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
[sharing (:or (:: "#" (make-uinteger digit10) "=")
168168
(:: "#" (make-uinteger digit10) "#"))]
169169

170-
[list-prefix (:or "" "#hash" "#hasheq" "#hasheqv" "#s" (:: "#" (:* digit10)))])
170+
[list-prefix (:or "" "#hash" "#hasheq" "#hasheqv" "#hashalw" "#s" (:: "#" (:* digit10)))])
171171

172172
(define-lex-trans make-num
173173
(syntax-rules ()

syntax-color-lib/syntax-color/racket-navigation.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
;; stick-to-next-sexp?: natural -> boolean
109109
(define stick-to-patterns
110110
'("'" "," ",@" "`" "#'" "#," "#`" "#,@"
111-
"#&" "#;" "#hash" "#hasheq" "#ci" "#cs"))
111+
"#&" "#;" "#hash" "#hashalw" "#hasheqv" "#hasheq" "#ci" "#cs"))
112112

113113
(define stick-to-patterns-union
114114
(regexp (string-append

syntax-color-test/tests/syntax-color/scheme-lexer.rkt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,16 @@
128128
(test "#CsA" "oooi")
129129
(test "#cIA" "oooi")
130130
(test "#hash(a" "ppppppi")
131+
(test "#hashalw(a" "pppppppppi")
132+
(test "#hasheqv(a" "pppppppppi")
131133
(test "#hasheq(a" "ppppppppi")
132134
(test "#hash[a" "ppppppi")
135+
(test "#hashalw[a" "pppppppppi")
136+
(test "#hasheqv[a" "pppppppppi")
133137
(test "#hasheq[a" "ppppppppi")
134138
(test "#hash{a" "ppppppi")
139+
(test "#hashalw{a" "pppppppppi")
140+
(test "#hasheqv{a" "pppppppppi")
135141
(test "#hasheq{a" "ppppppppi")
136142
(test "#135#a" "oooooi")
137143
(test "#453=a" "oooooi")
@@ -145,6 +151,7 @@ string-end
145151

146152
;; Bad #
147153
(test "#hashe(" "xxxxxxp")
154+
(test "#hasha(" "xxxxxxp")
148155
(test "#HASH(" "xxxxxp")
149156
(test "#HASHEQ(" "xxxxxxxp")
150157
(test "#a#a" "xxxx")

0 commit comments

Comments
 (0)