Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
8d5b4040
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
8d5b4040
编写于
7月 07, 2020
作者:
F
Fred Silberberg
提交者:
GitHub
7月 07, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #45624 from 333fred/vb-newline-fixes
VB Generator Fixes
上级
e793cea7
eb21aa04
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
6 deletion
+10
-6
src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/GreenNodes/GreenNodeWriter.vb
.../VisualBasicSyntaxGenerator/GreenNodes/GreenNodeWriter.vb
+3
-3
src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/RedNodes/RedNodeWriter.vb
...urce/VisualBasicSyntaxGenerator/RedNodes/RedNodeWriter.vb
+3
-3
src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/RedNodes/SyntaxFactsWriter.vb
.../VisualBasicSyntaxGenerator/RedNodes/SyntaxFactsWriter.vb
+4
-0
未找到文件。
src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/GreenNodes/GreenNodeWriter.vb
浏览文件 @
8d5b4040
...
...
@@ -848,15 +848,15 @@ Friend Class GreenNodeWriter
' visit all children
For
i
=
0
To
allChildren
.
Count
-
1
If
allChildren
(
i
).
IsList
Then
_writer
.
WriteLine
(
" Dim {0} = VisitList(node.{1})"
+
vbCrLf
+
_writer
.
WriteLine
(
" Dim {0} = VisitList(node.{1})"
+
Environment
.
NewLine
+
" If node.{2} IsNot {0}.Node Then anyChanges = True"
,
ChildNewVarName
(
allChildren
(
i
)),
ChildPropertyName
(
allChildren
(
i
)),
ChildVarName
(
allChildren
(
i
)))
ElseIf
KindTypeStructure
(
allChildren
(
i
).
ChildKind
).
IsToken
Then
_writer
.
WriteLine
(
" Dim {0} = DirectCast(Visit(node.{2}), {1})"
+
vbCrLf
+
_writer
.
WriteLine
(
" Dim {0} = DirectCast(Visit(node.{2}), {1})"
+
Environment
.
NewLine
+
" If node.{3} IsNot {0} Then anyChanges = True"
,
ChildNewVarName
(
allChildren
(
i
)),
BaseTypeReference
(
allChildren
(
i
)),
ChildPropertyName
(
allChildren
(
i
)),
ChildVarName
(
allChildren
(
i
)))
Else
_writer
.
WriteLine
(
" Dim {0} = DirectCast(Visit(node.{2}), {1})"
+
vbCrLf
+
_writer
.
WriteLine
(
" Dim {0} = DirectCast(Visit(node.{2}), {1})"
+
Environment
.
NewLine
+
" If node.{2} IsNot {0} Then anyChanges = True"
,
ChildNewVarName
(
allChildren
(
i
)),
ChildPropertyTypeRef
(
nodeStructure
,
allChildren
(
i
)),
ChildVarName
(
allChildren
(
i
)))
End
If
...
...
src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/RedNodes/RedNodeWriter.vb
浏览文件 @
8d5b4040
...
...
@@ -168,7 +168,7 @@ Friend Class RedNodeWriter
_writer
.
Write
(
" Case SyntaxKind."
&
kind
.
Name
)
first
=
False
Else
_writer
.
Write
(
","
&
vbCrLf
)
_writer
.
Write
(
","
&
Environment
.
NewLine
)
_writer
.
Write
(
" SyntaxKind."
&
kind
.
Name
)
End
If
...
...
@@ -1170,11 +1170,11 @@ Friend Class RedNodeWriter
End
If
ElseIf
KindTypeStructure
(
child
.
ChildKind
).
IsToken
Then
_writer
.
WriteLine
(
" Dim {0} = DirectCast(VisitToken(node.{2}).Node, {3})"
+
vbCrLf
+
_writer
.
WriteLine
(
" Dim {0} = DirectCast(VisitToken(node.{2}).Node, {3})"
+
Environment
.
NewLine
+
" If node.{2}.Node IsNot {0} Then anyChanges = True"
,
ChildNewVarName
(
child
),
BaseTypeReference
(
child
),
ChildPropertyName
(
child
),
ChildConstructorTypeRef
(
child
))
Else
_writer
.
WriteLine
(
" Dim {0} = DirectCast(Visit(node.{2}), {1})"
+
vbCrLf
+
_writer
.
WriteLine
(
" Dim {0} = DirectCast(Visit(node.{2}), {1})"
+
Environment
.
NewLine
+
" If node.{2} IsNot {0} Then anyChanges = True"
,
ChildNewVarName
(
child
),
ChildPropertyTypeRef
(
nodeStructure
,
child
),
ChildPropertyName
(
child
))
End
If
...
...
src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/RedNodes/SyntaxFactsWriter.vb
浏览文件 @
8d5b4040
...
...
@@ -86,6 +86,10 @@ Public Class SyntaxFactsWriter
tokenText
=
tokenText
.
Replace
(
"
""
"
,
"
""""
"
)
End
If
If
tokenText
IsNot
Nothing
AndAlso
tokenText
.
Contains
(
vbCrLf
)
Then
tokenText
=
tokenText
.
Replace
(
vbCrLf
,
Environment
.
NewLine
)
End
If
If
tokenText
<>
Nothing
Then
_writer
.
WriteLine
(
" Case SyntaxKind.{0}"
,
kind
.
Name
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录