Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
783a0aaf
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
783a0aaf
编写于
12月 18, 2017
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update the PHP grammar
Now it breaks out the html grammar into its own file
上级
55382a10
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
1597 addition
and
1545 deletion
+1597
-1545
build/npm/update-grammar.js
build/npm/update-grammar.js
+2
-2
extensions/php/build/update-grammar.js
extensions/php/build/update-grammar.js
+2
-1
extensions/php/package.json
extensions/php/package.json
+6
-1
extensions/php/syntaxes/html.tmLanguage.json
extensions/php/syntaxes/html.tmLanguage.json
+106
-0
extensions/php/syntaxes/php.tmLanguage.json
extensions/php/syntaxes/php.tmLanguage.json
+1481
-1541
未找到文件。
build/npm/update-grammar.js
浏览文件 @
783a0aaf
...
...
@@ -68,8 +68,8 @@ function getCommitSha(repoId, repoPath) {
});
}
exports
.
update
=
function
(
repoId
,
repoPath
,
dest
,
modifyGrammar
)
{
var
contentPath
=
'
https://raw.githubusercontent.com/
'
+
repoId
+
'
/master/
'
+
repoPath
;
exports
.
update
=
function
(
repoId
,
repoPath
,
dest
,
modifyGrammar
,
version
=
'
master
'
)
{
var
contentPath
=
'
https://raw.githubusercontent.com/
'
+
repoId
+
`/
${
version
}
/`
+
repoPath
;
console
.
log
(
'
Reading from
'
+
contentPath
);
return
download
(
contentPath
).
then
(
function
(
content
)
{
var
ext
=
path
.
extname
(
repoPath
);
...
...
extensions/php/build/update-grammar.js
浏览文件 @
783a0aaf
...
...
@@ -20,5 +20,6 @@ function adaptInjectionScope(grammar) {
injections
[
newInjectionKey
]
=
injection
;
}
updateGrammar
.
update
(
'
atom/language-php
'
,
'
grammars/php.cson
'
,
'
./syntaxes/php.tmLanguage.json
'
,
adaptInjectionScope
);
updateGrammar
.
update
(
'
atom/language-php
'
,
'
grammars/php.cson
'
,
'
./syntaxes/php.tmLanguage.json
'
,
undefined
);
updateGrammar
.
update
(
'
atom/language-php
'
,
'
grammars/html.cson
'
,
'
./syntaxes/html.tmLanguage.json
'
,
adaptInjectionScope
);
extensions/php/package.json
浏览文件 @
783a0aaf
...
...
@@ -35,10 +35,15 @@
}
],
"grammars"
:
[
{
"language"
:
"php"
,
"scopeName"
:
"source.php"
,
"path"
:
"./syntaxes/php.tmLanguage.json"
},
{
"language"
:
"php"
,
"scopeName"
:
"text.html.php"
,
"path"
:
"./syntaxes/
php
.tmLanguage.json"
,
"path"
:
"./syntaxes/
html
.tmLanguage.json"
,
"embeddedLanguages"
:
{
"text.html"
:
"html"
,
"source.php"
:
"php"
,
...
...
extensions/php/syntaxes/html.tmLanguage.json
0 → 100644
浏览文件 @
783a0aaf
{
"information_for_contributors"
:
[
"This file has been converted from https://github.com/atom/language-php/blob/master/grammars/html.cson"
,
"If you want to provide a fix or improvement, please create a pull request against the original repository."
,
"Once accepted there, we are happy to receive an update request."
],
"version"
:
"https://github.com/atom/language-php/commit/29c140e1531e0b5e842e5bfd4377f879d8b79cd4"
,
"scopeName"
:
"text.html.php"
,
"name"
:
"PHP"
,
"fileTypes"
:
[
"aw"
,
"ctp"
,
"inc"
,
"install"
,
"module"
,
"php"
,
"php_cs"
,
"php3"
,
"php4"
,
"php5"
,
"phpt"
,
"phtml"
,
"profile"
],
"firstLineMatch"
:
"(?x)
\n
# Hashbang
\n
^
\\
#!.*(?:
\\
s|
\\
/)
\n
php
\\
d?
\n
(?:$|
\\
s)
\n
|
\n
# Modeline
\n
(?i:
\n
# Emacs
\n
-
\\
*-(?:
\\
s*(?=[^:;
\\
s]+
\\
s*-
\\
*-)|(?:.*?[;
\\
s]|(?<=-
\\
*-))mode
\\
s*:
\\
s*)
\n
php
\n
(?=[
\\
s;]|(?<![-*])-
\\
*-).*?-
\\
*-
\n
|
\n
# Vim
\n
(?:(?:
\\
s|^)vi(?:m[<=>]?
\\
d+|m)?|
\\
sex)(?=:(?=
\\
s*set?
\\
s[^
\\
n:]+:)|:(?!
\\
s*set?
\\
s))(?:(?:
\\
s|
\\
s*:
\\
s*)
\\
w*(?:
\\
s*=(?:[^
\\
n
\\\\\\
s]|
\\\\
.)*)?)*[
\\
s:](?:filetype|ft|syntax)
\\
s*=
\n
(?:php|phtml)
\n
(?=
\\
s|:|$)
\n
)
\n
|
\n
# Regular opening PHP tags
\n
^
\\
s*<
\\
?(?i:php|=|
\\
s|$)"
,
"foldingStartMarker"
:
"(/
\\
*|
\\
{
\\
s*$|<<<HTML)"
,
"foldingStopMarker"
:
"(
\\
*/|^
\\
s*
\\
}|^HTML;)"
,
"injections"
:
{
"text.html.php - (meta.embedded | meta.tag), L:text.html.php meta.tag, L:text.html.php source.js"
:
{
"patterns"
:
[
{
"include"
:
"#php-tag"
}
]
}
},
"patterns"
:
[
{
"begin"
:
"
\\
A#!"
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.definition.comment.php"
}
},
"end"
:
"$"
,
"name"
:
"comment.line.shebang.php"
},
{
"include"
:
"text.html.basic"
}
],
"repository"
:
{
"php-tag"
:
{
"patterns"
:
[
{
"begin"
:
"<
\\
?(?i:php|=)?(?![^?]*
\\
?>)"
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.section.embedded.begin.php"
}
},
"end"
:
"(
\\
?)>"
,
"endCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.section.embedded.end.php"
},
"1"
:
{
"name"
:
"source.php"
}
},
"name"
:
"meta.embedded.block.php"
,
"contentName"
:
"source.php"
,
"patterns"
:
[
{
"include"
:
"source.php"
}
]
},
{
"begin"
:
"<
\\
?(?i:php|=)?"
,
"beginCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.section.embedded.begin.php"
}
},
"end"
:
"(
\\
?)>"
,
"endCaptures"
:
{
"0"
:
{
"name"
:
"punctuation.section.embedded.end.php"
},
"1"
:
{
"name"
:
"source.php"
}
},
"name"
:
"meta.embedded.line.php"
,
"contentName"
:
"source.php"
,
"patterns"
:
[
{
"include"
:
"source.php"
}
]
}
]
}
}
}
\ No newline at end of file
extensions/php/syntaxes/php.tmLanguage.json
浏览文件 @
783a0aaf
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录