Skip to content

Commit 078dc38

Browse files
committed
[cpp] update grammar
1 parent c96342e commit 078dc38

2 files changed

Lines changed: 118 additions & 5 deletions

File tree

extensions/cpp/syntaxes/c++.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@
425425
{
426426
"match": "\\\\x\\h+",
427427
"name": "constant.character.escape.cpp"
428+
},
429+
{
430+
"include": "source.c#string_placeholder"
428431
}
429432
]
430433
},
@@ -455,5 +458,5 @@
455458
]
456459
}
457460
},
458-
"version": "https://github.com/atom/language-c/commit/a74c2f967d73e802a67fa6e971a8e8dedf076597"
461+
"version": "https://github.com/atom/language-c/commit/3a269f88b12e512fb9495dc006a1dabf325d3d7f"
459462
}

extensions/cpp/test/colorize-results/test_cc.json

Lines changed: 114 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,29 @@
110110
}
111111
},
112112
{
113-
"c": "num_candidate_ret=%d:",
113+
"c": "num_candidate_ret=",
114+
"t": "source.cpp meta.function.c string.quoted.double.cpp",
115+
"r": {
116+
"dark_plus": "string: #CE9178",
117+
"light_plus": "string: #A31515",
118+
"dark_vs": "string: #CE9178",
119+
"light_vs": "string: #A31515",
120+
"hc_black": "string: #CE9178"
121+
}
122+
},
123+
{
124+
"c": "%d",
125+
"t": "source.cpp meta.function.c string.quoted.double.cpp constant.other.placeholder.c",
126+
"r": {
127+
"dark_plus": "string: #CE9178",
128+
"light_plus": "string: #A31515",
129+
"dark_vs": "string: #CE9178",
130+
"light_vs": "string: #A31515",
131+
"hc_black": "string: #CE9178"
132+
}
133+
},
134+
{
135+
"c": ":",
114136
"t": "source.cpp meta.function.c string.quoted.double.cpp",
115137
"r": {
116138
"dark_plus": "string: #CE9178",
@@ -407,7 +429,18 @@
407429
}
408430
},
409431
{
410-
"c": "%d,",
432+
"c": "%d",
433+
"t": "source.cpp meta.function.c string.quoted.double.cpp constant.other.placeholder.c",
434+
"r": {
435+
"dark_plus": "string: #CE9178",
436+
"light_plus": "string: #A31515",
437+
"dark_vs": "string: #CE9178",
438+
"light_vs": "string: #A31515",
439+
"hc_black": "string: #CE9178"
440+
}
441+
},
442+
{
443+
"c": ",",
411444
"t": "source.cpp meta.function.c string.quoted.double.cpp",
412445
"r": {
413446
"dark_plus": "string: #CE9178",
@@ -1375,7 +1408,29 @@
13751408
}
13761409
},
13771410
{
1378-
"c": "STYLE=Keramik;TITLE=%s;THEME=%s",
1411+
"c": "STYLE=Keramik;TITLE=",
1412+
"t": "source.cpp meta.block.c string.quoted.double.cpp",
1413+
"r": {
1414+
"dark_plus": "string: #CE9178",
1415+
"light_plus": "string: #A31515",
1416+
"dark_vs": "string: #CE9178",
1417+
"light_vs": "string: #A31515",
1418+
"hc_black": "string: #CE9178"
1419+
}
1420+
},
1421+
{
1422+
"c": "%s",
1423+
"t": "source.cpp meta.block.c string.quoted.double.cpp constant.other.placeholder.c",
1424+
"r": {
1425+
"dark_plus": "string: #CE9178",
1426+
"light_plus": "string: #A31515",
1427+
"dark_vs": "string: #CE9178",
1428+
"light_vs": "string: #A31515",
1429+
"hc_black": "string: #CE9178"
1430+
}
1431+
},
1432+
{
1433+
"c": ";THEME=",
13791434
"t": "source.cpp meta.block.c string.quoted.double.cpp",
13801435
"r": {
13811436
"dark_plus": "string: #CE9178",
@@ -1385,6 +1440,17 @@
13851440
"hc_black": "string: #CE9178"
13861441
}
13871442
},
1443+
{
1444+
"c": "%s",
1445+
"t": "source.cpp meta.block.c string.quoted.double.cpp constant.other.placeholder.c",
1446+
"r": {
1447+
"dark_plus": "string: #CE9178",
1448+
"light_plus": "string: #A31515",
1449+
"dark_vs": "string: #CE9178",
1450+
"light_vs": "string: #A31515",
1451+
"hc_black": "string: #CE9178"
1452+
}
1453+
},
13881454
{
13891455
"c": "\"",
13901456
"t": "source.cpp meta.block.c string.quoted.double.cpp punctuation.definition.string.end.cpp",
@@ -1705,7 +1771,51 @@
17051771
}
17061772
},
17071773
{
1708-
"c": "movw $0x38, %ax; ltr %ax",
1774+
"c": "movw $0x38, ",
1775+
"t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
1776+
"r": {
1777+
"dark_plus": "string: #CE9178",
1778+
"light_plus": "string: #A31515",
1779+
"dark_vs": "string: #CE9178",
1780+
"light_vs": "string: #A31515",
1781+
"hc_black": "string: #CE9178"
1782+
}
1783+
},
1784+
{
1785+
"c": "%a",
1786+
"t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp constant.other.placeholder.c",
1787+
"r": {
1788+
"dark_plus": "string: #CE9178",
1789+
"light_plus": "string: #A31515",
1790+
"dark_vs": "string: #CE9178",
1791+
"light_vs": "string: #A31515",
1792+
"hc_black": "string: #CE9178"
1793+
}
1794+
},
1795+
{
1796+
"c": "x; ltr ",
1797+
"t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
1798+
"r": {
1799+
"dark_plus": "string: #CE9178",
1800+
"light_plus": "string: #A31515",
1801+
"dark_vs": "string: #CE9178",
1802+
"light_vs": "string: #A31515",
1803+
"hc_black": "string: #CE9178"
1804+
}
1805+
},
1806+
{
1807+
"c": "%a",
1808+
"t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp constant.other.placeholder.c",
1809+
"r": {
1810+
"dark_plus": "string: #CE9178",
1811+
"light_plus": "string: #A31515",
1812+
"dark_vs": "string: #CE9178",
1813+
"light_vs": "string: #A31515",
1814+
"hc_black": "string: #CE9178"
1815+
}
1816+
},
1817+
{
1818+
"c": "x",
17091819
"t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp",
17101820
"r": {
17111821
"dark_plus": "string: #CE9178",

0 commit comments

Comments
 (0)