@@ -254,13 +254,15 @@ register_kinds!(JuliaSyntax, 0, [
254
254
" END_KEYWORDS"
255
255
256
256
" BEGIN_LITERAL"
257
- " Bool"
258
- " Integer"
259
- " BinInt"
260
- " HexInt"
261
- " OctInt"
262
- " Float"
263
- " Float32"
257
+ " BEGIN_NUMBERS"
258
+ " Bool"
259
+ " Integer"
260
+ " BinInt"
261
+ " HexInt"
262
+ " OctInt"
263
+ " Float"
264
+ " Float32"
265
+ " END_NUMBERS"
264
266
" String"
265
267
" Char"
266
268
" CmdString"
@@ -1114,6 +1116,7 @@ const _nonunique_kind_names = Set([
1114
1116
K " ErrorBidiFormatting"
1115
1117
K " ErrorInvalidOperator"
1116
1118
1119
+ K " Bool"
1117
1120
K " Integer"
1118
1121
K " BinInt"
1119
1122
K " HexInt"
@@ -1176,17 +1179,18 @@ is_error(k::Kind) = K"BEGIN_ERRORS" <= k <= K"END_ERRORS" || k == K"ErrorInvalid
1176
1179
is_keyword (k:: Kind ) = K " BEGIN_KEYWORDS" <= k <= K " END_KEYWORDS"
1177
1180
is_block_continuation_keyword (k:: Kind ) = K " BEGIN_BLOCK_CONTINUATION_KEYWORDS" <= k <= K " END_BLOCK_CONTINUATION_KEYWORDS"
1178
1181
is_literal (k:: Kind ) = K " BEGIN_LITERAL" <= k <= K " END_LITERAL"
1182
+ is_number (k:: Kind ) = K " BEGIN_NUMBERS" <= k <= K " END_NUMBERS"
1179
1183
is_operator (k:: Kind ) = K " BEGIN_OPS" <= k <= K " END_OPS"
1180
1184
is_word_operator (k:: Kind ) = (k == K " in" || k == K " isa" || k == K " where" )
1181
1185
1182
- is_identifier (k ) = is_identifier (kind (k ))
1183
- is_contextual_keyword (k ) = is_contextual_keyword (kind (k ))
1184
- is_error (k ) = is_error (kind (k ))
1185
- is_keyword (k ) = is_keyword (kind (k ))
1186
- is_literal (k ) = is_literal (kind (k ))
1187
- is_operator (k) = is_operator (kind (k ))
1188
- is_word_operator (k ) = is_word_operator (kind (k ))
1189
-
1186
+ is_identifier (x ) = is_identifier (kind (x ))
1187
+ is_contextual_keyword (x ) = is_contextual_keyword (kind (x ))
1188
+ is_error (x ) = is_error (kind (x ))
1189
+ is_keyword (x ) = is_keyword (kind (x ))
1190
+ is_literal (x ) = is_literal (kind (x ))
1191
+ is_number (x) = is_number (kind (x ))
1192
+ is_operator (x ) = is_operator (kind (x ))
1193
+ is_word_operator (x) = is_word_operator ( kind (x))
1190
1194
1191
1195
# Predicates for operator precedence
1192
1196
# FIXME : Review how precedence depends on dottedness, eg
@@ -1215,10 +1219,6 @@ is_syntax_kind(x) = K"BEGIN_SYNTAX_KINDS"<= kind(x) <= K"END_SYNTAX_KINDS"
1215
1219
is_macro_name (x) = K " BEGIN_MACRO_NAMES" <= kind (x) <= K " END_MACRO_NAMES"
1216
1220
is_syntactic_assignment (x) = K " BEGIN_SYNTACTIC_ASSIGNMENTS" <= kind (x) <= K " END_SYNTACTIC_ASSIGNMENTS"
1217
1221
1218
- function is_number (x)
1219
- kind (x) in (K " Integer" , K " BinInt" , K " HexInt" , K " OctInt" , K " Float" , K " Float32" )
1220
- end
1221
-
1222
1222
function is_string_delim (x)
1223
1223
kind (x) in (K "\" " , K "\"\"\" " )
1224
1224
end
0 commit comments