File tree Expand file tree Collapse file tree 3 files changed +38
-29
lines changed Expand file tree Collapse file tree 3 files changed +38
-29
lines changed Original file line number Diff line number Diff line change @@ -1142,8 +1142,6 @@ function simple_hash(str)
1142
1142
end
1143
1143
1144
1144
kws = [
1145
- Tokens. ABSTRACT,
1146
- Tokens. AS,
1147
1145
Tokens. BAREMODULE,
1148
1146
Tokens. BEGIN,
1149
1147
Tokens. BREAK,
@@ -1165,22 +1163,26 @@ Tokens.LET,
1165
1163
Tokens. LOCAL,
1166
1164
Tokens. MACRO,
1167
1165
Tokens. MODULE,
1168
- Tokens. MUTABLE,
1169
- Tokens. OUTER,
1170
- Tokens. PRIMITIVE,
1171
1166
Tokens. QUOTE,
1172
1167
Tokens. RETURN,
1173
1168
Tokens. STRUCT,
1174
1169
Tokens. TRY,
1175
- Tokens. TYPE,
1176
1170
Tokens. USING,
1177
- Tokens. VAR,
1178
1171
Tokens. WHILE,
1179
1172
Tokens. IN,
1180
1173
Tokens. ISA,
1181
1174
Tokens. WHERE,
1182
1175
Tokens. TRUE,
1183
1176
Tokens. FALSE,
1177
+
1178
+ Tokens. ABSTRACT,
1179
+ Tokens. AS,
1180
+ Tokens. DOC,
1181
+ Tokens. MUTABLE,
1182
+ Tokens. OUTER,
1183
+ Tokens. PRIMITIVE,
1184
+ Tokens. TYPE,
1185
+ Tokens. VAR,
1184
1186
]
1185
1187
1186
1188
const kw_hash = Dict (simple_hash (lowercase (string (kw))) => kw for kw in kws)
Original file line number Diff line number Diff line change 40
40
begin_contextural_keywords,
41
41
ABSTRACT,
42
42
AS,
43
+ DOC,
43
44
MUTABLE,
44
- NEW,
45
45
OUTER,
46
46
PRIMITIVE,
47
47
TYPE,
Original file line number Diff line number Diff line change 234
234
end
235
235
236
236
@testset " keywords" begin
237
- for kw in [" function" ,
238
- " abstract" ,
239
- " as" ,
240
- " baremodule" ,
237
+ for kw in [" baremodule" ,
241
238
" begin" ,
242
239
" break" ,
243
240
" catch" ,
@@ -248,27 +245,31 @@ end
248
245
" elseif" ,
249
246
" end" ,
250
247
" export" ,
251
- # "false",
252
248
" finally" ,
253
249
" for" ,
254
250
" function" ,
255
251
" global" ,
256
- " let" ,
257
- " local" ,
258
252
" if" ,
259
253
" import" ,
254
+ " let" ,
255
+ " local" ,
260
256
" macro" ,
261
257
" module" ,
262
- " mutable" ,
263
- " primitive" ,
264
258
" quote" ,
265
259
" return" ,
266
260
" struct" ,
267
- # "true",
268
261
" try" ,
269
- " type" ,
270
262
" using" ,
271
- " while" ]
263
+ " while" ,
264
+
265
+ " abstract" ,
266
+ " as" ,
267
+ " doc" ,
268
+ " mutable" ,
269
+ " outer" ,
270
+ " primitive" ,
271
+ " type" ,
272
+ " var" ]
272
273
273
274
@test T. kind (tok (kw)) == T. KEYWORD
274
275
end
752
753
@test all (s-> Base. isoperator (Symbol (s)) == Tokens. isoperator (first (collect (tokenize (s))). kind), allops)
753
754
end
754
755
755
- const all_kws = Set ([" abstract " ,
756
- " as " ,
756
+ const all_kws = Set ([
757
+ # Keywords
757
758
" baremodule" ,
758
759
" begin" ,
759
760
" break" ,
@@ -775,22 +776,28 @@ const all_kws = Set(["abstract",
775
776
" local" ,
776
777
" macro" ,
777
778
" module" ,
778
- " mutable" ,
779
- " outer" ,
780
- " primitive" ,
781
779
" quote" ,
782
780
" return" ,
783
781
" struct" ,
784
782
" try" ,
785
- " type" ,
786
783
" using" ,
787
784
" while" ,
788
- " in" ,
789
- " isa" ,
785
+ # Contextural keywords
786
+ " abstract" ,
787
+ " as" ,
788
+ " doc" ,
789
+ " mutable" ,
790
+ " outer" ,
791
+ " primitive" ,
792
+ " type" ,
790
793
" var" ,
791
- " where " ,
794
+ # Literals
792
795
" true" ,
793
796
" false" ,
797
+ # Word-like operators
798
+ " in" ,
799
+ " isa" ,
800
+ " where" ,
794
801
])
795
802
796
803
function check_kw_hashes (iter)
You can’t perform that action at this time.
0 commit comments