@@ -5,47 +5,47 @@ export const cGrammar: Grammar = {
55 scopeName : 'source.c' ,
66 keywords : {
77 // Control flow
8- 'if' : 'keyword.control.c' ,
9- ' else' : 'keyword.control.c' ,
10- ' for' : 'keyword.control.c' ,
11- ' while' : 'keyword.control.c' ,
12- 'do' : 'keyword.control.c' ,
13- ' switch' : 'keyword.control.c' ,
14- ' case' : 'keyword.control.c' ,
15- ' default' : 'keyword.control.c' ,
16- ' break' : 'keyword.control.c' ,
17- ' continue' : 'keyword.control.c' ,
18- ' return' : 'keyword.control.c' ,
19- ' goto' : 'keyword.control.c' ,
8+ if : 'keyword.control.c' ,
9+ else : 'keyword.control.c' ,
10+ for : 'keyword.control.c' ,
11+ while : 'keyword.control.c' ,
12+ do : 'keyword.control.c' ,
13+ switch : 'keyword.control.c' ,
14+ case : 'keyword.control.c' ,
15+ default : 'keyword.control.c' ,
16+ break : 'keyword.control.c' ,
17+ continue : 'keyword.control.c' ,
18+ return : 'keyword.control.c' ,
19+ goto : 'keyword.control.c' ,
2020 // Types
21- ' void' : 'storage.type.c' ,
22- ' char' : 'storage.type.c' ,
23- ' short' : 'storage.type.c' ,
24- ' int' : 'storage.type.c' ,
25- ' long' : 'storage.type.c' ,
26- ' float' : 'storage.type.c' ,
27- ' double' : 'storage.type.c' ,
28- ' signed' : 'storage.type.c' ,
29- ' unsigned' : 'storage.type.c' ,
30- ' struct' : 'storage.type.c' ,
31- ' union' : 'storage.type.c' ,
32- ' enum' : 'storage.type.c' ,
33- ' typedef' : 'storage.type.c' ,
21+ void : 'storage.type.c' ,
22+ char : 'storage.type.c' ,
23+ short : 'storage.type.c' ,
24+ int : 'storage.type.c' ,
25+ long : 'storage.type.c' ,
26+ float : 'storage.type.c' ,
27+ double : 'storage.type.c' ,
28+ signed : 'storage.type.c' ,
29+ unsigned : 'storage.type.c' ,
30+ struct : 'storage.type.c' ,
31+ union : 'storage.type.c' ,
32+ enum : 'storage.type.c' ,
33+ typedef : 'storage.type.c' ,
3434 // Modifiers
35- ' const' : 'storage.modifier.c' ,
36- ' static' : 'storage.modifier.c' ,
37- ' extern' : 'storage.modifier.c' ,
38- ' register' : 'storage.modifier.c' ,
39- ' volatile' : 'storage.modifier.c' ,
40- ' inline' : 'storage.modifier.c' ,
41- ' restrict' : 'storage.modifier.c' ,
42- ' _Atomic' : 'storage.modifier.c' ,
35+ const : 'storage.modifier.c' ,
36+ static : 'storage.modifier.c' ,
37+ extern : 'storage.modifier.c' ,
38+ register : 'storage.modifier.c' ,
39+ volatile : 'storage.modifier.c' ,
40+ inline : 'storage.modifier.c' ,
41+ restrict : 'storage.modifier.c' ,
42+ _Atomic : 'storage.modifier.c' ,
4343 // Operators
44- ' sizeof' : 'keyword.operator.sizeof.c' ,
44+ sizeof : 'keyword.operator.sizeof.c' ,
4545 // Standard library types
46- ' size_t' : 'support.type.c' ,
47- ' FILE' : 'support.type.c' ,
48- ' NULL' : 'constant.language.c' ,
46+ size_t : 'support.type.c' ,
47+ FILE : 'support.type.c' ,
48+ NULL : 'constant.language.c' ,
4949 } ,
5050 patterns : [
5151 { include : '#preprocessor' } ,
@@ -63,22 +63,22 @@ export const cGrammar: Grammar = {
6363 name : 'meta.preprocessor.include.c' ,
6464 match : '^\\s*#\\s*include\\s+(<[^>]+>|"[^"]+")' ,
6565 captures : {
66- '1' : { name : 'string.quoted.other.lt-gt.include.c' } ,
66+ 1 : { name : 'string.quoted.other.lt-gt.include.c' } ,
6767 } ,
6868 } ,
6969 {
7070 name : 'meta.preprocessor.macro.c' ,
7171 match : '^\\s*#\\s*(define|undef)\\s+([a-zA-Z_][a-zA-Z0-9_]*)' ,
7272 captures : {
73- '1' : { name : 'keyword.control.directive.c' } ,
74- '2' : { name : 'entity.name.function.preprocessor.c' } ,
73+ 1 : { name : 'keyword.control.directive.c' } ,
74+ 2 : { name : 'entity.name.function.preprocessor.c' } ,
7575 } ,
7676 } ,
7777 {
7878 name : 'meta.preprocessor.c' ,
7979 match : '^\\s*#\\s*(if|ifdef|ifndef|elif|else|endif|pragma|error|warning|line)\\b' ,
8080 captures : {
81- '1' : { name : 'keyword.control.directive.c' } ,
81+ 1 : { name : 'keyword.control.directive.c' } ,
8282 } ,
8383 } ,
8484 ] ,
@@ -111,8 +111,8 @@ export const cGrammar: Grammar = {
111111 } ,
112112 {
113113 name : 'string.quoted.single.c' ,
114- begin : "'" ,
115- end : "'" ,
114+ begin : '\'' ,
115+ end : '\'' ,
116116 patterns : [
117117 {
118118 name : 'constant.character.escape.c' ,
0 commit comments