summaryrefslogtreecommitdiff
path: root/context/data/vscode/extensions/context/syntaxes/context-syntax-cpp.json
blob: 67941c5511a85a741d22c751ab312c955fe49373 (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
 "name" : "context.cpp",
 "patterns" : [
  {
   "include" : "#keyword"
  },
  {
   "include" : "#datatype"
  },
  {
   "include" : "#luatex"
  },
  {
   "include" : "#identifier"
  },
  {
   "include" : "#macro"
  },
  {
   "include" : "#string_double"
  },
  {
   "include" : "#string_single"
  },
  {
   "include" : "#texcomment"
  },
  {
   "include" : "#longcomment"
  },
  {
   "include" : "#shortcomment"
  },
  {
   "include" : "#hexnumber"
  },
  {
   "include" : "#decnumber"
  },
  {
   "include" : "#operator"
  }
 ],
 "repository" : {
  "datatype" : {
   "match" : "\u005Cb(void|unsigned|union|struct|signed|short|long|int|float|enum|double|char|bool)\u005Cb",
   "name" : "context.keyword.datatype.c"
  },
  "decnumber" : {
   "match" : "[\u005C-]?[0-9]+(\u005C.[0-9]+)?([eEpP]\u005C-?[0-9]+)?",
   "name" : "context.number.dec.c"
  },
  "hexnumber" : {
   "match" : "[\u005C-]?0[xX][A-Fa-f0-9]+(\u005C.[A-Fa-f0-9]+)?([eEpP]\u005C-?[A-Fa-f0-9]+)?",
   "name" : "context.number.hex.c"
  },
  "identifier" : {
   "match" : "[A-Za-z_][A-Za-z_0-9]*",
   "name" : "context.default.identifier.c"
  },
  "keyword" : {
   "match" : "\u005Cb(while|volatile|virtual|using|typename|typeid|typedef|try|true|throw|this|template|switch|static_cast|static_assert|static|slots|sizeof|signals|return|restrict|reinterpret_cast|register|public|protected|private|operator|new|namespace|mutable|inline|if|goto|friend|for|false|extern|export|explicit|else|dynamic_cast|do|delete|default|continue|const_cast|const|class|catch|case|break|auto|asm|_Pragma|_Imaginary|_Complex|_Bool)\u005Cb",
   "name" : "context.keyword.c.c"
  },
  "longcomment" : {
   "begin" : "/\u005C*",
   "end" : "\u005C*/",
   "name" : "context.comment.long.c"
  },
  "luatex" : {
   "match" : "\u005Cb(scaled|halfword)\u005Cb",
   "name" : "context.command.luatex.c"
  },
  "macro" : {
   "captures" : {
    "1" : {
     "name" : "context.data.macro.tag.c"
    },
    "2" : {
     "name" : "context.data.macro.name.c"
    }
   },
   "match" : "\u005Cs*(#)\u005Cs*\u005Cb(warning|using|undef|pragma|line|include|import|ifndef|ifdef|if|error|endif|else|elif|define)\u005Cb"
  },
  "operator" : {
   "match" : "\u005C~|}|\u005C||{|\u005C^|\u005C]|\u005C[|\u005C?|>|=|<|;|:|/|\u005C.|\u005C-|\u005C+|\u005C*|\u005C)|\u005C(|\u005C&|\u005C%|\u005C!",
   "name" : "context.operator.any.c"
  },
  "shortcomment" : {
   "match" : "//.*$\u005Cn?",
   "name" : "context.comment.short.c"
  },
  "string_double" : {
   "captures" : {
    "1" : {
     "name" : "context.special.doublequoted.open.c"
    },
    "2" : {
     "name" : "context.string.doublequoted.text.c"
    },
    "3" : {
     "name" : "context.special.doublequoted.close.c"
    }
   },
   "match" : "(\u0022)((?:\u005C\u005C\u0022|[^\u0022])*)(\u0022)"
  },
  "string_single" : {
   "captures" : {
    "1" : {
     "name" : "context.special.singlequoted.open.c"
    },
    "2" : {
     "name" : "context.string.singlequoted.text.c"
    },
    "3" : {
     "name" : "context.special.singlequoted.close.c"
    }
   },
   "match" : "(')((?:\u005C\u005C'|[^'])*)(')"
  },
  "texcomment" : {
   "begin" : "/\u005C*tex",
   "beginCaptures" : {
    "0" : {
     "name" : "context.comment.tex.open.c"
    }
   },
   "end" : "\u005C*/",
   "endCaptures" : {
    "0" : {
     "name" : "context.comment.tex.close.c"
    }
   },
   "patterns" : [
    {
     "include" : "source.context.tex"
    }
   ]
  }
 },
 "scopeName" : "source.context.cpp",
 "version" : "1.0.0"
}