|
| 1 | +{ |
| 2 | + "scopeName": "quarkus-value.injection", |
| 3 | + "injectionSelector": "L:string.unquoted.java-properties", |
| 4 | + "patterns": [ |
| 5 | + { |
| 6 | + "include": "#numbers" |
| 7 | + }, |
| 8 | + { |
| 9 | + "include": "#expression" |
| 10 | + } |
| 11 | + ], |
| 12 | + "repository": { |
| 13 | + "numbers": { |
| 14 | + "patterns": [ |
| 15 | + { |
| 16 | + "match": "(?x)\n\\b(?<!\\$)\n0(x|X)\n(\n (?<!\\.)[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?[Ll]?(?!\\.)\n |\n (\n [0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?\\.?\n |\n ([0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?)?\\.[0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?\n )\n [Pp][+-]?[0-9]([0-9_]*[0-9])?[FfDd]?\n)\n\\b(?!\\$)", |
| 17 | + "name": "constant.numeric.hex.java-properties" |
| 18 | + }, |
| 19 | + { |
| 20 | + "match": "\\b(?<!\\$)0(b|B)[01]([01_]*[01])?[Ll]?\\b(?!\\$)", |
| 21 | + "name": "constant.numeric.binary.java-properties" |
| 22 | + }, |
| 23 | + { |
| 24 | + "match": "\\b(?<!\\$)0[0-7]([0-7_]*[0-7])?[Ll]?\\b(?!\\$)", |
| 25 | + "name": "constant.numeric.octal.java-properties" |
| 26 | + }, |
| 27 | + { |
| 28 | + "match": "(?x)\n(?<!\\$)\n(\n \\b[0-9]([0-9_]*[0-9])?\\.\\B(?!\\.)\n |\n \\b[0-9]([0-9_]*[0-9])?\\.([Ee][+-]?[0-9]([0-9_]*[0-9])?)[FfDd]?\\b\n |\n \\b[0-9]([0-9_]*[0-9])?\\.([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]\\b\n |\n \\b[0-9]([0-9_]*[0-9])?\\.([0-9]([0-9_]*[0-9])?)([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]?\\b\n |\n (?<!\\.)\\B\\.[0-9]([0-9_]*[0-9])?([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]?\\b\n |\n \\b[0-9]([0-9_]*[0-9])?([Ee][+-]?[0-9]([0-9_]*[0-9])?)[FfDd]?\\b\n |\n \\b[0-9]([0-9_]*[0-9])?([Ee][+-]?[0-9]([0-9_]*[0-9])?)?[FfDd]\\b\n |\n \\b(0|[1-9]([0-9_]*[0-9])?)(?!\\.)[Ll]?\\b\n)\n(?!\\$)", |
| 29 | + "name": "constant.numeric.decimal.java-properties" |
| 30 | + } |
| 31 | + ] |
| 32 | + }, |
| 33 | + "expression": { |
| 34 | + "comment": "Matching for expression. Ex : ${expression:value} ${my.prop${compose}} ${my.prop}${my.prop}", |
| 35 | + "begin": "(\\$\\{)", |
| 36 | + "beginCaptures": { |
| 37 | + "1": { |
| 38 | + "name": "support.function.java-properties" |
| 39 | + } |
| 40 | + }, |
| 41 | + "end": "(\\})", |
| 42 | + "endCaptures": { |
| 43 | + "1": { |
| 44 | + "name": "support.function.java-properties" |
| 45 | + } |
| 46 | + }, |
| 47 | + "patterns": [ |
| 48 | + { |
| 49 | + "match": "(?<=\\{)([a-zA-z.]+)", |
| 50 | + "name": "support.type.name.java-properties" |
| 51 | + }, |
| 52 | + { |
| 53 | + "match": "(:)", |
| 54 | + "name": "keyword.operator.assign.value.java-properties" |
| 55 | + }, |
| 56 | + { |
| 57 | + "match": "(?<=\\:)([a-zA-z0-9]+)", |
| 58 | + "name": "variable.other.value.java-properties" |
| 59 | + }, |
| 60 | + { |
| 61 | + "include": "#expression" |
| 62 | + } |
| 63 | + ] |
| 64 | + } |
| 65 | + } |
| 66 | +} |
0 commit comments