File: json.sublime-syntax

package info (click to toggle)
rust-xh 0.24.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,608 kB
  • sloc: sh: 242; makefile: 6
file content (42 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: JSON Key-Value
file_extensions:
  - json
scope: source.json
contexts:
  main:
    - match: //.*
      comment: Single-line comment
      scope: comment.single.line.jsonkv
    - match: /\*
      comment: Multi-line comment
      push:
        - meta_scope: comment.block.jsonkv
        - match: \*/
          pop: true
    - match: '(")(?i)([^\\"]+)(")\s*?:'
      comment: Key names
      captures:
        1: keyword.other.name.jsonkv.start
        2: keyword.other.name.jsonkv
        3: keyword.other.name.jsonkv.end
    - match: '"'
      comment: String values
      push:
        - meta_scope: string.quoted.jsonkv
        - match: '"'
          pop: true
        - match: '\\[tnr"]'
          comment: Escape characters
          scope: constant.character.escape.jsonkv
    - match: \d+(?:.\d+)?
      comment: Numeric values
      scope: constant.numeric.jsonkv
    - match: true|false
      comment: Boolean values
      scope: constant.language.boolean.jsonkv
    - match: "null"
      comment: Null value
      scope: constant.language.null.jsonkv