Skip to content

Commit 94f8efc

Browse files
committed
[php] use grammar from atom/language-php
1 parent 4bbd43e commit 94f8efc

7 files changed

Lines changed: 2653 additions & 2677 deletions

File tree

extensions/php/OSSREADME.json

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
11
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
22
[{
33
"name": "language-php",
4-
"version": "0.29.0",
4+
"version": "0.0.0",
55
"license": "MIT",
66
"repositoryURL": "https://github.com/atom/language-php",
7-
"description": "The file snippets/php.json was derived from the Atom package https://atom.io/packages/language-php which was originally converted from the PHP TextMate bundle https://github.com/textmate/php.tmbundle."
8-
},
9-
{
10-
"name": "textmate/php.tmbundle",
11-
"version": "0.0.0",
12-
"license": "TextMate Bundle License",
13-
"repositoryURL": "https://github.com/textmate/php.tmbundle",
14-
"licenseDetail": [
15-
"Copyright (c) textmate-php.tmbundle project authors",
16-
"",
17-
"If not otherwise specified (see below), files in this repository fall under the following license:",
18-
"",
19-
"Permission to copy, use, modify, sell and distribute this",
20-
"software is granted. This software is provided \"as is\" without",
21-
"express or implied warranty, and with no claim as to its",
22-
"suitability for any purpose.",
23-
"",
24-
"An exception is made for files in readable text which contain their own license information,",
25-
"or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added",
26-
"to the base-name name of the original file, and an extension of txt, html, or similar. For example",
27-
"\"tidy\" is accompanied by \"tidy-license.txt\"."
28-
]
7+
"description": "The files snippets/php.json & syntaxes/php.tmLanguage.json were derived from the Atom package https://atom.io/packages/language-php which was originally converted from the PHP TextMate bundle https://github.com/textmate/php.tmbundle."
298
}]

extensions/php/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"grammars": [{
2020
"language": "php",
2121
"scopeName": "text.html.php",
22-
"path": "./syntaxes/php.json",
22+
"path": "./syntaxes/php.tmLanguage.json",
2323
"embeddedLanguages": {
2424
"text.html": "html",
2525
"source.php": "php",
@@ -66,6 +66,7 @@
6666
},
6767
"scripts": {
6868
"compile": "gulp compile-extension:php",
69-
"watch": "gulp watch-extension:php"
69+
"watch": "gulp watch-extension:php",
70+
"update-grammar": "node ../../build/npm/update-grammar.js atom/language-php grammars/php.cson ./syntaxes/php.tmLanguage.json"
7071
}
7172
}

extensions/php/syntaxes/php.json

Lines changed: 0 additions & 2638 deletions
This file was deleted.

extensions/php/syntaxes/php.tmLanguage.json

Lines changed: 2632 additions & 0 deletions
Large diffs are not rendered by default.

extensions/php/test/colorize-results/test_php.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,10 @@
223223
"c": "<?php",
224224
"t": "begin.block.embedded.meta.metatag.php.punctuation.section",
225225
"r": {
226-
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.metatag.php rgb(86, 156, 214)",
227-
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.metatag.php rgb(128, 0, 0)",
228-
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.metatag.php rgb(86, 156, 214)",
229-
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.metatag.php rgb(128, 0, 0)",
226+
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.punctuation.section.embedded.begin.metatag.php rgb(86, 156, 214)",
227+
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.punctuation.section.embedded.begin.metatag.php rgb(128, 0, 0)",
228+
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.punctuation.section.embedded.begin.metatag.php rgb(86, 156, 214)",
229+
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.punctuation.section.embedded.begin.metatag.php rgb(128, 0, 0)",
230230
"hc_black": ".hc-black .token rgb(255, 255, 255)"
231231
}
232232
},
@@ -3237,21 +3237,21 @@
32373237
"c": "?",
32383238
"t": "block.embedded.end.meta.metatag.php.punctuation.section.source",
32393239
"r": {
3240-
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.metatag.php rgb(86, 156, 214)",
3241-
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.metatag.php rgb(128, 0, 0)",
3242-
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.metatag.php rgb(86, 156, 214)",
3243-
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.metatag.php rgb(128, 0, 0)",
3240+
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.punctuation.section.embedded.end.metatag.php rgb(86, 156, 214)",
3241+
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.punctuation.section.embedded.end.metatag.php rgb(128, 0, 0)",
3242+
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.punctuation.section.embedded.end.metatag.php rgb(86, 156, 214)",
3243+
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.punctuation.section.embedded.end.metatag.php rgb(128, 0, 0)",
32443244
"hc_black": ".hc-black .token rgb(255, 255, 255)"
32453245
}
32463246
},
32473247
{
32483248
"c": ">",
32493249
"t": "block.embedded.end.meta.metatag.php.punctuation.section",
32503250
"r": {
3251-
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.metatag.php rgb(86, 156, 214)",
3252-
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.metatag.php rgb(128, 0, 0)",
3253-
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.metatag.php rgb(86, 156, 214)",
3254-
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.metatag.php rgb(128, 0, 0)",
3251+
"dark_plus": ".vs-dark.vscode-theme-defaults-themes-dark_plus-json .token.punctuation.section.embedded.end.metatag.php rgb(86, 156, 214)",
3252+
"light_plus": ".vs.vscode-theme-defaults-themes-light_plus-json .token.punctuation.section.embedded.end.metatag.php rgb(128, 0, 0)",
3253+
"dark_vs": ".vs-dark.vscode-theme-defaults-themes-dark_vs-json .token.punctuation.section.embedded.end.metatag.php rgb(86, 156, 214)",
3254+
"light_vs": ".vs.vscode-theme-defaults-themes-light_vs-json .token.punctuation.section.embedded.end.metatag.php rgb(128, 0, 0)",
32553255
"hc_black": ".hc-black .token rgb(255, 255, 255)"
32563256
}
32573257
},

extensions/theme-defaults/themes/dark_vs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@
271271
}
272272
},
273273
{
274-
"scope": "metatag.php",
274+
"name": "coloring of the PHP start and end tag (<?php and ?>)",
275+
"scope": ["punctuation.section.embedded.begin.metatag.php", "punctuation.section.embedded.end.metatag.php"],
275276
"settings": {
276277
"foreground": "#569cd6"
277278
}

extensions/theme-defaults/themes/light_vs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@
268268
}
269269
},
270270
{
271-
"scope": "metatag.php",
271+
"name": "coloring of the PHP start and end tag (<?php and ?>)",
272+
"scope": ["punctuation.section.embedded.begin.metatag.php", "punctuation.section.embedded.end.metatag.php"],
272273
"settings": {
273274
"foreground": "#800000"
274275
}

0 commit comments

Comments
 (0)