Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
282af06c
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
282af06c
编写于
8月 29, 2018
作者:
A
Alexandru Dima
提交者:
GitHub
8月 29, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #57439 from Geloosa/monarch-language-types
shorthand types for Monarch language action
上级
930724e6
be13b6b4
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
26 addition
and
12 deletion
+26
-12
src/vs/editor/standalone/common/monarch/monarchTypes.ts
src/vs/editor/standalone/common/monarch/monarchTypes.ts
+17
-7
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+9
-5
未找到文件。
src/vs/editor/standalone/common/monarch/monarchTypes.ts
浏览文件 @
282af06c
...
...
@@ -40,13 +40,15 @@ export interface IMonarchLanguage {
tokenPostfix
?:
string
;
}
export
type
IShortMonarchLanguageRule1
=
[
RegExp
,
string
|
IMonarchLanguageAction
];
export
type
IShortMonarchLanguageRule2
=
[
RegExp
,
string
|
IMonarchLanguageAction
,
string
];
/**
* A rule is either a regular expression and an action
* shorthands: [reg,act] == { regex: reg, action: act}
* and : [reg,act,nxt] == { regex: reg, action: act{ next: nxt }}
*/
export
type
IShortMonarchLanguageRule1
=
[
RegExp
,
IMonarchLanguageAction
];
export
type
IShortMonarchLanguageRule2
=
[
RegExp
,
IMonarchLanguageAction
,
string
];
export
interface
IExpandedMonarchLanguageRule
{
/**
* match tokens
...
...
@@ -62,24 +64,27 @@ export interface IExpandedMonarchLanguageRule {
*/
include
?:
string
;
}
export
type
IMonarchLanguageRule
=
IShortMonarchLanguageRule1
|
IShortMonarchLanguageRule2
|
IExpandedMonarchLanguageRule
;
export
type
IMonarchLanguageRule
=
IShortMonarchLanguageRule1
|
IShortMonarchLanguageRule2
|
IExpandedMonarchLanguageRule
;
/**
* An action is either an array of actions...
* ... or a case statement with guards...
* ... or a basic action with a token value.
*/
export
interface
IMonarchLanguageAction
{
export
type
IShortMonarchLanguageAction
=
string
;
export
interface
IExpandedMonarchLanguageAction
{
/**
* array of actions for each parenthesized match group
*/
group
?:
IMonarchLanguageAction
[];
/**
* map from string to ILanguageAction
*/
cases
?:
Object
;
/**
* token class (ie. css class) (or "@brackets" or "@rematch")
*/
...
...
@@ -110,6 +115,11 @@ export interface IMonarchLanguageAction {
log
?:
string
;
}
export
type
IMonarchLanguageAction
=
IShortMonarchLanguageAction
|
IExpandedMonarchLanguageAction
|
IShortMonarchLanguageAction
[]
|
IExpandedMonarchLanguageAction
[];
/**
* This interface can be shortened as an array, ie. ['{','}','delimiter.curly']
*/
...
...
src/vs/monaco.d.ts
浏览文件 @
282af06c
...
...
@@ -5398,15 +5398,15 @@ declare namespace monaco.languages {
tokenPostfix
?:
string
;
}
export
type
IShortMonarchLanguageRule1
=
[
RegExp
,
string
|
IMonarchLanguageAction
];
export
type
IShortMonarchLanguageRule2
=
[
RegExp
,
string
|
IMonarchLanguageAction
,
string
];
/**
* A rule is either a regular expression and an action
* shorthands: [reg,act] == { regex: reg, action: act}
* and : [reg,act,nxt] == { regex: reg, action: act{ next: nxt }}
*/
export
type
IShortMonarchLanguageRule1
=
[
RegExp
,
IMonarchLanguageAction
];
export
type
IShortMonarchLanguageRule2
=
[
RegExp
,
IMonarchLanguageAction
,
string
];
export
interface
IExpandedMonarchLanguageRule
{
/**
* match tokens
...
...
@@ -5429,7 +5429,9 @@ declare namespace monaco.languages {
* ... or a case statement with guards...
* ... or a basic action with a token value.
*/
export
interface
IMonarchLanguageAction
{
export
type
IShortMonarchLanguageAction
=
string
;
export
interface
IExpandedMonarchLanguageAction
{
/**
* array of actions for each parenthesized match group
*/
...
...
@@ -5468,6 +5470,8 @@ declare namespace monaco.languages {
log
?:
string
;
}
export
type
IMonarchLanguageAction
=
IShortMonarchLanguageAction
|
IExpandedMonarchLanguageAction
|
IShortMonarchLanguageAction
[]
|
IExpandedMonarchLanguageAction
[];
/**
* This interface can be shortened as an array, ie. ['{','}','delimiter.curly']
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录