|
| 1 | +'scopeName': 'source.yaml' |
| 2 | +'name': 'PyRestTest' |
| 3 | +'fileTypes': ['yaml'] |
| 4 | +'patterns': [ |
| 5 | + { 'include': '#comment' } |
| 6 | + { 'include': '#yaml' } |
| 7 | +] |
| 8 | +'repository': |
| 9 | + 'comment': |
| 10 | + 'match': '^(\\s*)#.*$' |
| 11 | + 'name': 'comment.line.number-sign.pyresttest' |
| 12 | + 'constant': |
| 13 | + 'match': '\\b(?:true|false|null)\\b' |
| 14 | + 'name': 'constant.language.pyresttest' |
| 15 | + 'number': |
| 16 | + 'comment': 'handles integer and decimal numbers' |
| 17 | + 'match': '-?(?=[1-9]|0(?!\\d))\\d+(\\.\\d+)?([eE][+-]?\\d+)?' |
| 18 | + 'name': 'constant.numeric.pyresttest' |
| 19 | + 'escape_char': |
| 20 | + 'match': '\\\\\\S' |
| 21 | + 'name': 'constant.character.escape.pyresttest' |
| 22 | + 'single_quoted_string': |
| 23 | + 'begin': '\'' |
| 24 | + 'beginCaptures': |
| 25 | + '0': |
| 26 | + 'name': 'punctuation.definition.string.begin.pyresttest' |
| 27 | + 'end': '\'' |
| 28 | + 'endCaptures': |
| 29 | + '0': |
| 30 | + 'name': 'punctuation.definition.string.end.pyresttest' |
| 31 | + 'name': 'string.quoted.simple' |
| 32 | + 'patterns': [ |
| 33 | + { 'include': '#escape_char' } |
| 34 | + { 'include': '#variable' } |
| 35 | + { 'include': '#url' } |
| 36 | + { 'include': '#object' } |
| 37 | + ] |
| 38 | + 'double_quoted_string': |
| 39 | + 'begin': '"' |
| 40 | + 'beginCaptures': |
| 41 | + '0': |
| 42 | + 'name': 'punctuation.definition.string.begin.pyresttest' |
| 43 | + 'end': '"' |
| 44 | + 'endCaptures': |
| 45 | + '0': |
| 46 | + 'name': 'punctuation.definition.string.end.pyresttest' |
| 47 | + 'name': 'string.quoted.simple' |
| 48 | + 'patterns': [ |
| 49 | + { 'include': '#escape_char' } |
| 50 | + { 'include': '#variable' } |
| 51 | + { 'include': '#url' } |
| 52 | + { 'include': '#object' } |
| 53 | + ] |
| 54 | + 'variable': |
| 55 | + 'patterns': [ |
| 56 | + { |
| 57 | + 'match': '(\\$)[a-zA-Z_][a-zA-Z0-9_]*' |
| 58 | + 'captures': |
| 59 | + '1': |
| 60 | + 'name': 'punctuation.definition.variable.pyresttest' |
| 61 | + 'name': 'variable.other.normal.pyresttest' |
| 62 | + } |
| 63 | + ] |
| 64 | + 'pyresttest_constant': |
| 65 | + 'match': 'template|jmespath|jsonpath_mini|comparator|expected|schema|file' |
| 66 | + 'name': 'constant.language.pyresttest' |
| 67 | + 'object': |
| 68 | + 'begin':'\\{' |
| 69 | + 'beginCaptures': |
| 70 | + '0': |
| 71 | + 'name': 'punctuation.definition.dictionary.begin.pyresttest' |
| 72 | + 'end':'\\}' |
| 73 | + 'endCaptures': |
| 74 | + '0': |
| 75 | + 'name': 'punctuation.definition.dictionary.end.pyresttest' |
| 76 | + 'name': 'meta.structure.dictionary.pyresttest' |
| 77 | + 'patterns': [ |
| 78 | + { |
| 79 | + 'comment': 'the JSON object key' |
| 80 | + 'include': '#key' |
| 81 | + } |
| 82 | + { |
| 83 | + 'begin': ':' |
| 84 | + 'beginCaptures': |
| 85 | + '0': |
| 86 | + 'name': 'punctuation.separator.dictionary.key-value.pyresttest' |
| 87 | + 'end': '(,)|(?=\\})' |
| 88 | + 'endCaptures': |
| 89 | + '1': |
| 90 | + 'name': 'punctuation.separator.dictionary.pair.pyresttest' |
| 91 | + 'name': 'meta.structure.dictionary.value.pyresttest' |
| 92 | + 'patterns': [ |
| 93 | + { |
| 94 | + 'comment': 'the JSON object value' |
| 95 | + 'include': '#value' |
| 96 | + } |
| 97 | + ] |
| 98 | + } |
| 99 | + ] |
| 100 | + 'yaml': |
| 101 | + 'begin': '^(?:\\s*)(?:(-)\\s*)' |
| 102 | + 'beginCaptures': |
| 103 | + '1': |
| 104 | + 'name': 'punctuation.definition.entry.yaml' |
| 105 | + 'end': '$' |
| 106 | + 'patterns': [ |
| 107 | + { |
| 108 | + 'comment': 'the YAML tag' |
| 109 | + 'include': '#yaml_tag' |
| 110 | + } |
| 111 | + { |
| 112 | + 'begin': ':' |
| 113 | + 'beginCaptures': |
| 114 | + '0': |
| 115 | + 'name': 'punctuation.separator.yaml.tag-value.pyresttest' |
| 116 | + 'end': '(?=$)' |
| 117 | + 'name': 'meta.structure.yaml.value.pyresttest' |
| 118 | + 'patterns': [ |
| 119 | + { |
| 120 | + 'comment': 'the YAML value' |
| 121 | + 'include': '#yaml_value' |
| 122 | + } |
| 123 | + ] |
| 124 | + } |
| 125 | + ] |
| 126 | + 'key': |
| 127 | + 'patterns': [ |
| 128 | + { 'include': '#pyresttest_constant' } |
| 129 | + { 'include': '#single_quoted_string' } |
| 130 | + { 'include': '#double_quoted_string' } |
| 131 | + { |
| 132 | + 'match': '\\w+' |
| 133 | + 'name': 'entity.name.type.dictionary.key.pyresttest' |
| 134 | + } |
| 135 | + ] |
| 136 | + 'yaml_tag': |
| 137 | + 'patterns': [ |
| 138 | + { |
| 139 | + 'match': '\\w+' |
| 140 | + 'name': 'entity.name.tag.pyresttest' |
| 141 | + } |
| 142 | + { |
| 143 | + 'begin': '\'' |
| 144 | + 'beginCaptures': |
| 145 | + '0': |
| 146 | + 'name': 'punctuation.definition.string.begin.pyresttest' |
| 147 | + 'end': '\'' |
| 148 | + 'endCaptures': |
| 149 | + '0': |
| 150 | + 'name': 'punctuation.definition.string.end.pyresttest' |
| 151 | + 'name': 'entity.name.tag.pyresttest' |
| 152 | + 'patterns': [ |
| 153 | + { 'include': '#escape_char' } |
| 154 | + ] |
| 155 | + } |
| 156 | + { |
| 157 | + 'begin': '"' |
| 158 | + 'beginCaptures': |
| 159 | + '0': |
| 160 | + 'name': 'punctuation.definition.string.begin.pyresttest' |
| 161 | + 'end': '"' |
| 162 | + 'endCaptures': |
| 163 | + '0': |
| 164 | + 'name': 'punctuation.definition.string.end.pyresttest' |
| 165 | + 'name': 'entity.name.tag.pyresttest' |
| 166 | + 'patterns': [ |
| 167 | + { 'include': '#escape_char' } |
| 168 | + ] |
| 169 | + } |
| 170 | + ] |
| 171 | + 'yaml_value': |
| 172 | + 'patterns': [ |
| 173 | + { 'include': '#single_quoted_string' } |
| 174 | + { 'include': '#double_quoted_string' } |
| 175 | + { 'include': '#url' } |
| 176 | + { 'include': '#object' } |
| 177 | + ] |
| 178 | + 'value': |
| 179 | + 'patterns': [ |
| 180 | + { 'include': '#constant' } |
| 181 | + { 'include': '#number' } |
| 182 | + { 'include': '#url' } |
| 183 | + { 'include': '#single_quoted_string' } |
| 184 | + { 'include': '#double_quoted_string' } |
| 185 | + { 'include': '#variable' } |
| 186 | + { 'include': '#array' } |
| 187 | + { 'include': '#object' } |
| 188 | + ] |
| 189 | + 'array': |
| 190 | + 'begin': '\\[' |
| 191 | + 'beginCaptures': |
| 192 | + '0': |
| 193 | + 'name': 'punctuation.definition.array.begin.pyresttest' |
| 194 | + 'end': '\\]' |
| 195 | + 'endCaptures': |
| 196 | + '0': |
| 197 | + 'name': 'punctuation.definition.array.end.pyresttest' |
| 198 | + 'name': 'meta.structure.array.json' |
| 199 | + 'patterns': [ |
| 200 | + { 'include': '#value' } |
| 201 | + { |
| 202 | + 'match': ',' |
| 203 | + 'name': 'punctuation.separator.array.pyresttest' |
| 204 | + } |
| 205 | + { |
| 206 | + 'match': '[^\\s\\]]' |
| 207 | + 'name': 'invalid.illegal.expected-array-separator.pyresttest' |
| 208 | + } |
| 209 | + ] |
| 210 | + 'url_parameter_key': |
| 211 | + 'match': '(?:\\?|&)(\\w+)(?=\\=)' |
| 212 | + 'captures': |
| 213 | + '1': |
| 214 | + 'name': 'url.parameter.key.pyresttest' |
| 215 | + 'url': |
| 216 | + 'match': '(?:(?:https?:\\/)|(?:\\.+))?(\\/[\\w\\.\\-\\?=\\$\\&]*)+' |
| 217 | + 'name': 'markup.link.pyresttest' |
| 218 | + 'captures': |
| 219 | + '1': |
| 220 | + 'patterns': [ |
| 221 | + { 'include': '#url_parameter_key' } |
| 222 | + { 'include': '#variable'} |
| 223 | + ] |
0 commit comments