Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
b0351f13
F
fsharp
项目概览
dotNET Platform
/
fsharp
11 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
b0351f13
编写于
12月 18, 2018
作者:
P
Phillip Carter
提交者:
GitHub
12月 18, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove quickparse from VS.FSI (#5841)
上级
4b7ea080
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
81 deletion
+0
-81
vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj
vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj
+0
-1
vsintegration/src/FSharp.VS.FSI/quickparse.fs
vsintegration/src/FSharp.VS.FSI/quickparse.fs
+0
-80
未找到文件。
vsintegration/src/FSharp.VS.FSI/FSharp.VS.FSI.fsproj
浏览文件 @
b0351f13
...
...
@@ -29,7 +29,6 @@
<Compile
Include=
"$(FSharpSourcesRoot)\utils\CompilerLocationUtils.fs"
>
<Link>
CompilerLocationUtils.fs
</Link>
</Compile>
<Compile
Include=
"quickparse.fs"
/>
<Compile
Include=
"sessions.fs"
/>
<Compile
Include=
"fsiBasis.fs"
/>
<Compile
Include=
"fsiLanguageService.fs"
/>
...
...
vsintegration/src/FSharp.VS.FSI/quickparse.fs
已删除
100644 → 0
浏览文件 @
4b7ea080
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace
Microsoft
.
VisualStudio
.
FSharp
.
Interactive
open
System
.
Globalization
// Duplication note:
// Inlined from Language Service.
// If/when there is a common DLL this code can be shared.
/// Methods for cheaply and innacurately parsing F#
module
internal
QuickParse
=
/// The characters that are allowed to be in an identifier.
let
private
IsIdentifierPartCharacter
c
=
let
cat
=
System
.
Char
.
GetUnicodeCategory
(
c
)
(
// Letters
cat
=
UnicodeCategory
.
UppercaseLetter
||
cat
=
UnicodeCategory
.
LowercaseLetter
||
cat
=
UnicodeCategory
.
TitlecaseLetter
||
cat
=
UnicodeCategory
.
ModifierLetter
||
cat
=
UnicodeCategory
.
OtherLetter
||
cat
=
UnicodeCategory
.
LetterNumber
// Numbers
||
cat
=
UnicodeCategory
.
DecimalDigitNumber
// Connectors
||
cat
=
UnicodeCategory
.
ConnectorPunctuation
// Combiners
||
cat
=
UnicodeCategory
.
NonSpacingMark
||
cat
=
UnicodeCategory
.
SpacingCombiningMark
)
/// Is this character a part of a long identifier
let
private
IsLongIdentifierPartCharacter
c
=
(
IsIdentifierPartCharacter
c
)
||
(
c
=
'.'
)
/// Given a line of text and an index into the line return the
/// "island" of text that could be an identifier around index.
let
GetIdentifierIsland
(
line
:
string
,
index
)=
if
index
<
line
.
Length
then
let
hoverChar
=
line
.[
index
]
if
not
(
IsLongIdentifierPartCharacter
hoverChar
)
then
// The character is not an identifier character. Return nothing
None
else
let
mutable
left
=
index
let
mutable
right
=
if
line
.[
index
]=
'.'
then
index
+
1
else
index
let
len
=
line
.
Length
while
left
>=
0
&&
IsLongIdentifierPartCharacter
line
.[
left
]
do
left
<-
left
-
1
while
right
<
len
&&
IsIdentifierPartCharacter
line
.[
right
]
do
right
<-
right
+
1
let
result
=
line
.
Substring
(
left
+
1
,
right
-
left
-
1
)
Some
(
result
)
else
None
/// Get the partial long name of the identifier to the left of index.
let
GetPartialLongName
(
line
:
string
,
index
)
=
let
IsIdentifierPartCharacter
(
pos
)
=
IsIdentifierPartCharacter
(
line
.[
pos
])
let
IsLongIdentifierPartCharacter
(
pos
)
=
IsLongIdentifierPartCharacter
(
line
.[
pos
])
let
IsDot
(
pos
)
=
line
.[
pos
]=
'.'
let
rec
InLeadingIdentifier
(
pos
,
right
,
prior
)
=
let
PushName
()
=
(
line
.
Substring
(
pos
+
1
,
right
-
pos
-
1
),
None
)::
prior
if
pos
<
0
then
PushName
()
else
if
IsIdentifierPartCharacter
(
pos
)
then
InLeadingIdentifier
(
pos
-
1
,
right
,
prior
)
else
if
IsDot
(
pos
)
then
InLeadingIdentifier
(
pos
-
1
,
pos
,
PushName
()
)
else
PushName
()
let
rec
InName
(
pos
,
startResidue
,
right
)
=
let
NameAndResidue
()
=
[
line
.
Substring
(
pos
+
1
,
startResidue
-
pos
-
1
),
Some
(
line
.
Substring
(
startResidue
+
1
,
right
-
startResidue
))]
if
pos
<
0
then
[
line
.
Substring
(
pos
+
1
,
startResidue
-
pos
-
1
),
Some
(
line
.
Substring
(
startResidue
+
1
,
right
-
startResidue
))]
else
if
IsIdentifierPartCharacter
(
pos
)
then
InName
(
pos
-
1
,
startResidue
,
right
)
else
if
IsDot
(
pos
)
then
InLeadingIdentifier
(
pos
-
1
,
pos
,
NameAndResidue
()
)
else
NameAndResidue
()
and
InResidueOrName
(
pos
,
right
)
=
if
pos
<
0
then
[
line
.
Substring
(
pos
+
1
,
right
-
pos
),
None
]
else
if
IsDot
(
pos
)
then
InName
(
pos
-
1
,
pos
,
right
)
else
if
IsLongIdentifierPartCharacter
(
pos
)
then
InResidueOrName
(
pos
-
1
,
right
)
else
[
line
.
Substring
(
pos
+
1
,
right
-
pos
),
None
]
let
result
=
InResidueOrName
(
index
,
index
)
result
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录