Skip to content

Commit 154ba17

Browse files
committed
Update make grammar
1 parent 750ed36 commit 154ba17

3 files changed

Lines changed: 14 additions & 299 deletions

File tree

extensions/make/cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"git": {
77
"name": "fadeevab/make.tmbundle",
88
"repositoryUrl": "https://github.com/fadeevab/make.tmbundle",
9-
"commitHash": "c6b3ae6e4f22e01fc483be5bb34a9682c28f3219"
9+
"commitHash": "d01ce3404f9e2eed0fd4d07b5e24094c03599241"
1010
}
1111
},
1212
"licenseDetail": [
@@ -29,4 +29,4 @@
2929
}
3030
],
3131
"version": 1
32-
}
32+
}

extensions/make/syntaxes/make.tmLanguage.json

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/fadeevab/make.tmbundle/commit/c6b3ae6e4f22e01fc483be5bb34a9682c28f3219",
7+
"version": "https://github.com/fadeevab/make.tmbundle/commit/d01ce3404f9e2eed0fd4d07b5e24094c03599241",
88
"name": "Makefile",
99
"scopeName": "source.makefile",
1010
"patterns": [
@@ -260,37 +260,6 @@
260260
}
261261
]
262262
},
263-
"shell-interpolation": {
264-
"begin": "(?=`)",
265-
"end": "(?!\\G)",
266-
"name": "meta.embedded.line.shell",
267-
"patterns": [
268-
{
269-
"begin": "`",
270-
"beginCaptures": {
271-
"0": {
272-
"name": "punctuation.definition.string.makefile"
273-
}
274-
},
275-
"contentName": "source.shell",
276-
"end": "(`)",
277-
"endCaptures": {
278-
"0": {
279-
"name": "punctuation.definition.string.makefile"
280-
},
281-
"1": {
282-
"name": "source.shell"
283-
}
284-
},
285-
"name": "string.interpolated.backtick.makefile",
286-
"patterns": [
287-
{
288-
"include": "source.shell"
289-
}
290-
]
291-
}
292-
]
293-
},
294263
"target": {
295264
"begin": "^(?!\\t)([^:]*)(:)(?!\\=)",
296265
"beginCaptures": {
@@ -351,7 +320,12 @@
351320
]
352321
},
353322
"recipe": {
354-
"begin": "^\\t",
323+
"begin": "^\\t([+-@]*)",
324+
"beginCaptures": {
325+
"1": {
326+
"name": "keyword.control.$1.makefile"
327+
}
328+
},
355329
"end": "[^\\\\]$",
356330
"name": "meta.scope.recipe.makefile",
357331
"patterns": [
@@ -361,9 +335,6 @@
361335
},
362336
{
363337
"include": "#variables"
364-
},
365-
{
366-
"include": "source.shell"
367338
}
368339
]
369340
},
@@ -388,9 +359,6 @@
388359
},
389360
{
390361
"include": "#variables"
391-
},
392-
{
393-
"include": "#shell-interpolation"
394362
}
395363
]
396364
},

extensions/make/test/colorize-results/makefile.json

Lines changed: 5 additions & 258 deletions
Original file line numberDiff line numberDiff line change
@@ -682,29 +682,7 @@
682682
}
683683
},
684684
{
685-
"c": "\trm ",
686-
"t": "source.makefile meta.scope.recipe.makefile",
687-
"r": {
688-
"dark_plus": "default: #D4D4D4",
689-
"light_plus": "default: #000000",
690-
"dark_vs": "default: #D4D4D4",
691-
"light_vs": "default: #000000",
692-
"hc_black": "default: #FFFFFF"
693-
}
694-
},
695-
{
696-
"c": "*",
697-
"t": "source.makefile meta.scope.recipe.makefile keyword.operator.glob.shell",
698-
"r": {
699-
"dark_plus": "keyword.operator: #D4D4D4",
700-
"light_plus": "keyword.operator: #000000",
701-
"dark_vs": "keyword.operator: #D4D4D4",
702-
"light_vs": "keyword.operator: #000000",
703-
"hc_black": "keyword.operator: #D4D4D4"
704-
}
705-
},
706-
{
707-
"c": "o hello",
685+
"c": "\trm *o hello",
708686
"t": "source.makefile meta.scope.recipe.makefile",
709687
"r": {
710688
"dark_plus": "default: #D4D4D4",
@@ -825,63 +803,8 @@
825803
}
826804
},
827805
{
828-
"c": "(",
829-
"t": "source.makefile meta.scope.recipe.makefile meta.scope.subshell.shell punctuation.definition.subshell.shell",
830-
"r": {
831-
"dark_plus": "default: #D4D4D4",
832-
"light_plus": "default: #000000",
833-
"dark_vs": "default: #D4D4D4",
834-
"light_vs": "default: #000000",
835-
"hc_black": "default: #FFFFFF"
836-
}
837-
},
838-
{
839-
"c": "sed -nre ",
840-
"t": "source.makefile meta.scope.recipe.makefile meta.scope.subshell.shell",
841-
"r": {
842-
"dark_plus": "default: #D4D4D4",
843-
"light_plus": "default: #000000",
844-
"dark_vs": "default: #D4D4D4",
845-
"light_vs": "default: #000000",
846-
"hc_black": "default: #FFFFFF"
847-
}
848-
},
849-
{
850-
"c": "'",
851-
"t": "source.makefile meta.scope.recipe.makefile meta.scope.subshell.shell string.quoted.single.shell punctuation.definition.string.begin.shell",
852-
"r": {
853-
"dark_plus": "string: #CE9178",
854-
"light_plus": "string: #A31515",
855-
"dark_vs": "string: #CE9178",
856-
"light_vs": "string: #A31515",
857-
"hc_black": "string: #CE9178"
858-
}
859-
},
860-
{
861-
"c": "s/some regex with (group)/\\1/p",
862-
"t": "source.makefile meta.scope.recipe.makefile meta.scope.subshell.shell string.quoted.single.shell",
863-
"r": {
864-
"dark_plus": "string: #CE9178",
865-
"light_plus": "string: #A31515",
866-
"dark_vs": "string: #CE9178",
867-
"light_vs": "string: #A31515",
868-
"hc_black": "string: #CE9178"
869-
}
870-
},
871-
{
872-
"c": "'",
873-
"t": "source.makefile meta.scope.recipe.makefile meta.scope.subshell.shell string.quoted.single.shell punctuation.definition.string.end.shell",
874-
"r": {
875-
"dark_plus": "string: #CE9178",
876-
"light_plus": "string: #A31515",
877-
"dark_vs": "string: #CE9178",
878-
"light_vs": "string: #A31515",
879-
"hc_black": "string: #CE9178"
880-
}
881-
},
882-
{
883-
"c": ")",
884-
"t": "source.makefile meta.scope.recipe.makefile meta.scope.subshell.shell punctuation.definition.subshell.shell",
806+
"c": "(sed -nre 's/some regex with (group)/\\1/p')",
807+
"t": "source.makefile meta.scope.recipe.makefile",
885808
"r": {
886809
"dark_plus": "default: #D4D4D4",
887810
"light_plus": "default: #000000",
@@ -946,139 +869,7 @@
946869
}
947870
},
948871
{
949-
"c": "\t",
950-
"t": "source.makefile meta.scope.recipe.makefile",
951-
"r": {
952-
"dark_plus": "default: #D4D4D4",
953-
"light_plus": "default: #000000",
954-
"dark_vs": "default: #D4D4D4",
955-
"light_vs": "default: #000000",
956-
"hc_black": "default: #FFFFFF"
957-
}
958-
},
959-
{
960-
"c": "echo",
961-
"t": "source.makefile meta.scope.recipe.makefile support.function.builtin.shell",
962-
"r": {
963-
"dark_plus": "support.function: #DCDCAA",
964-
"light_plus": "support.function: #795E26",
965-
"dark_vs": "default: #D4D4D4",
966-
"light_vs": "default: #000000",
967-
"hc_black": "support.function: #DCDCAA"
968-
}
969-
},
970-
{
971-
"c": " ",
972-
"t": "source.makefile meta.scope.recipe.makefile",
973-
"r": {
974-
"dark_plus": "default: #D4D4D4",
975-
"light_plus": "default: #000000",
976-
"dark_vs": "default: #D4D4D4",
977-
"light_vs": "default: #000000",
978-
"hc_black": "default: #FFFFFF"
979-
}
980-
},
981-
{
982-
"c": "\"",
983-
"t": "source.makefile meta.scope.recipe.makefile string.quoted.double.shell punctuation.definition.string.begin.shell",
984-
"r": {
985-
"dark_plus": "string: #CE9178",
986-
"light_plus": "string: #A31515",
987-
"dark_vs": "string: #CE9178",
988-
"light_vs": "string: #A31515",
989-
"hc_black": "string: #CE9178"
990-
}
991-
},
992-
{
993-
"c": "#",
994-
"t": "source.makefile meta.scope.recipe.makefile string.quoted.double.shell",
995-
"r": {
996-
"dark_plus": "string: #CE9178",
997-
"light_plus": "string: #A31515",
998-
"dark_vs": "string: #CE9178",
999-
"light_vs": "string: #A31515",
1000-
"hc_black": "string: #CE9178"
1001-
}
1002-
},
1003-
{
1004-
"c": "\"",
1005-
"t": "source.makefile meta.scope.recipe.makefile string.quoted.double.shell punctuation.definition.string.end.shell",
1006-
"r": {
1007-
"dark_plus": "string: #CE9178",
1008-
"light_plus": "string: #A31515",
1009-
"dark_vs": "string: #CE9178",
1010-
"light_vs": "string: #A31515",
1011-
"hc_black": "string: #CE9178"
1012-
}
1013-
},
1014-
{
1015-
"c": " and ",
1016-
"t": "source.makefile meta.scope.recipe.makefile",
1017-
"r": {
1018-
"dark_plus": "default: #D4D4D4",
1019-
"light_plus": "default: #000000",
1020-
"dark_vs": "default: #D4D4D4",
1021-
"light_vs": "default: #000000",
1022-
"hc_black": "default: #FFFFFF"
1023-
}
1024-
},
1025-
{
1026-
"c": "'",
1027-
"t": "source.makefile meta.scope.recipe.makefile string.quoted.single.shell punctuation.definition.string.begin.shell",
1028-
"r": {
1029-
"dark_plus": "string: #CE9178",
1030-
"light_plus": "string: #A31515",
1031-
"dark_vs": "string: #CE9178",
1032-
"light_vs": "string: #A31515",
1033-
"hc_black": "string: #CE9178"
1034-
}
1035-
},
1036-
{
1037-
"c": "#",
1038-
"t": "source.makefile meta.scope.recipe.makefile string.quoted.single.shell",
1039-
"r": {
1040-
"dark_plus": "string: #CE9178",
1041-
"light_plus": "string: #A31515",
1042-
"dark_vs": "string: #CE9178",
1043-
"light_vs": "string: #A31515",
1044-
"hc_black": "string: #CE9178"
1045-
}
1046-
},
1047-
{
1048-
"c": "'",
1049-
"t": "source.makefile meta.scope.recipe.makefile string.quoted.single.shell punctuation.definition.string.end.shell",
1050-
"r": {
1051-
"dark_plus": "string: #CE9178",
1052-
"light_plus": "string: #A31515",
1053-
"dark_vs": "string: #CE9178",
1054-
"light_vs": "string: #A31515",
1055-
"hc_black": "string: #CE9178"
1056-
}
1057-
},
1058-
{
1059-
"c": " ",
1060-
"t": "source.makefile meta.scope.recipe.makefile",
1061-
"r": {
1062-
"dark_plus": "default: #D4D4D4",
1063-
"light_plus": "default: #000000",
1064-
"dark_vs": "default: #D4D4D4",
1065-
"light_vs": "default: #000000",
1066-
"hc_black": "default: #FFFFFF"
1067-
}
1068-
},
1069-
{
1070-
"c": "in",
1071-
"t": "source.makefile meta.scope.recipe.makefile keyword.control.shell",
1072-
"r": {
1073-
"dark_plus": "keyword.control: #C586C0",
1074-
"light_plus": "keyword.control: #AF00DB",
1075-
"dark_vs": "keyword.control: #569CD6",
1076-
"light_vs": "keyword.control: #0000FF",
1077-
"hc_black": "keyword.control: #C586C0"
1078-
}
1079-
},
1080-
{
1081-
"c": " quotes are not comments ",
872+
"c": "\techo \"#\" and '#' in quotes are not comments ",
1082873
"t": "source.makefile meta.scope.recipe.makefile",
1083874
"r": {
1084875
"dark_plus": "default: #D4D4D4",
@@ -1100,51 +891,7 @@
1100891
}
1101892
},
1102893
{
1103-
"c": "\t\tand ",
1104-
"t": "source.makefile meta.scope.recipe.makefile",
1105-
"r": {
1106-
"dark_plus": "default: #D4D4D4",
1107-
"light_plus": "default: #000000",
1108-
"dark_vs": "default: #D4D4D4",
1109-
"light_vs": "default: #000000",
1110-
"hc_black": "default: #FFFFFF"
1111-
}
1112-
},
1113-
{
1114-
"c": "'",
1115-
"t": "source.makefile meta.scope.recipe.makefile string.quoted.single.shell punctuation.definition.string.begin.shell",
1116-
"r": {
1117-
"dark_plus": "string: #CE9178",
1118-
"light_plus": "string: #A31515",
1119-
"dark_vs": "string: #CE9178",
1120-
"light_vs": "string: #A31515",
1121-
"hc_black": "string: #CE9178"
1122-
}
1123-
},
1124-
{
1125-
"c": "\\",
1126-
"t": "source.makefile meta.scope.recipe.makefile string.quoted.single.shell",
1127-
"r": {
1128-
"dark_plus": "string: #CE9178",
1129-
"light_plus": "string: #A31515",
1130-
"dark_vs": "string: #CE9178",
1131-
"light_vs": "string: #A31515",
1132-
"hc_black": "string: #CE9178"
1133-
}
1134-
},
1135-
{
1136-
"c": "'",
1137-
"t": "source.makefile meta.scope.recipe.makefile string.quoted.single.shell punctuation.definition.string.end.shell",
1138-
"r": {
1139-
"dark_plus": "string: #CE9178",
1140-
"light_plus": "string: #A31515",
1141-
"dark_vs": "string: #CE9178",
1142-
"light_vs": "string: #A31515",
1143-
"hc_black": "string: #CE9178"
1144-
}
1145-
},
1146-
{
1147-
"c": " will be continued",
894+
"c": "\t\tand '\\' will be continued",
1148895
"t": "source.makefile meta.scope.recipe.makefile",
1149896
"r": {
1150897
"dark_plus": "default: #D4D4D4",

0 commit comments

Comments
 (0)