File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
runtime/queries/properties Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1515((value) @constant.builtin.boolean
1616 (#any-of? @constant.builtin.boolean "true" "false" "enabled" "disabled"))
1717
18- ((value) @constant.numeric.integer
19- (#match? @constant.numeric.integer "^-?[0-9]+$"))
20-
2118((value) @constant.numeric.float
22- (#match? @constant.numeric.float "^-?[0-9]+\.[0-9]$"))
19+ ; ASK: should "1." be considered `float`?
20+ (#match? @constant.numeric.float "^[+-]?(([0-9]*\.[0-9]+(e[0-9]+)?)|([0-9]+e[0-9]+))$"))
21+
22+ ((value) @constant.numeric.integer
23+ ; according to the Java spec, hex literals must represent a 64bit int;
24+ ; overflow (too long) is considered an error.
25+ ; however, since these are just strings,
26+ ; a long hex-literal could represent a BigInt, so we allow it
27+ (#match? @constant.numeric.integer "^([+-]?[0-9]+)|(0[xX][0-9a-fA-F]+)$"))
2328
2429((value) @string.special.path
2530 (#match? @string.special.path "^(\.{1,2})?/"))
You can’t perform that action at this time.
0 commit comments