-
Notifications
You must be signed in to change notification settings - Fork 4k
/
ArgumentSyntax.vb
82 lines (62 loc) · 2.72 KB
/
ArgumentSyntax.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
' Licensed to the .NET Foundation under one or more agreements.
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
Imports Microsoft.CodeAnalysis.Text
Imports Microsoft.CodeAnalysis.VisualBasic.Symbols
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax
Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax
Partial Public Class ArgumentSyntax
''' <summary>
''' Gets a value indicating whether this argument is a named argument.
''' </summary>
''' <returns>True if this argument is a named argument; otherwise false.</returns>
Public MustOverride ReadOnly Property IsNamed As Boolean
''' <summary>
''' Gets a value indicating whether this argument is an omitted argument.
''' </summary>
''' <returns>True if this argument is an omitted argument; otherwise false.</returns>
Public ReadOnly Property IsOmitted As Boolean
Get
Return Kind = SyntaxKind.OmittedArgument
End Get
End Property
''' <summary>
''' Gets the expression of this argument, if any.
''' </summary>
''' <returns>The expression of this argument if it is a simple argument; otherwise null.</returns>
Public MustOverride Function GetExpression() As ExpressionSyntax
End Class
Partial Public Class SimpleArgumentSyntax
Public NotOverridable Overrides ReadOnly Property IsNamed As Boolean
Get
Return NameColonEquals IsNot Nothing
End Get
End Property
<ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)>
Public NotOverridable Overrides Function GetExpression() As ExpressionSyntax
Return Expression
End Function
End Class
Partial Public Class OmittedArgumentSyntax
Public NotOverridable Overrides ReadOnly Property IsNamed As Boolean
Get
Return False
End Get
End Property
<ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)>
Public NotOverridable Overrides Function GetExpression() As ExpressionSyntax
Return Nothing
End Function
End Class
Partial Public Class RangeArgumentSyntax
Public NotOverridable Overrides ReadOnly Property IsNamed As Boolean
Get
Return False
End Get
End Property
<ComponentModel.EditorBrowsable(ComponentModel.EditorBrowsableState.Never)>
Public NotOverridable Overrides Function GetExpression() As ExpressionSyntax
Return UpperBound
End Function
End Class
End Namespace