Refactored ILabelStatement to ILabeledStatement.

上级 7902721e
......@@ -1264,24 +1264,24 @@ private IVariableDeclarationStatement CreateBoundMultipleLocalDeclarationsOperat
return new LazyVariableDeclarationStatement(declarations, _semanticModel, syntax, type, constantValue);
}
private ILabelStatement CreateBoundLabelStatementOperation(BoundLabelStatement boundLabelStatement)
private ILabeledStatement CreateBoundLabelStatementOperation(BoundLabelStatement boundLabelStatement)
{
ILabelSymbol label = boundLabelStatement.Label;
Lazy<IOperation> labeledStatement = new Lazy<IOperation>(() => Create(null));
Lazy<IOperation> statement = new Lazy<IOperation>(() => Create(null));
SyntaxNode syntax = boundLabelStatement.Syntax;
ITypeSymbol type = null;
Optional<object> constantValue = default(Optional<object>);
return new LazyLabelStatement(label, labeledStatement, _semanticModel, syntax, type, constantValue);
return new LazyLabeledStatement(label, statement, _semanticModel, syntax, type, constantValue);
}
private ILabelStatement CreateBoundLabeledStatementOperation(BoundLabeledStatement boundLabeledStatement)
private ILabeledStatement CreateBoundLabeledStatementOperation(BoundLabeledStatement boundLabeledStatement)
{
ILabelSymbol label = boundLabeledStatement.Label;
Lazy<IOperation> labeledStatement = new Lazy<IOperation>(() => Create(boundLabeledStatement.Body));
SyntaxNode syntax = boundLabeledStatement.Syntax;
ITypeSymbol type = null;
Optional<object> constantValue = default(Optional<object>);
return new LazyLabelStatement(label, labeledStatement, _semanticModel, syntax, type, constantValue);
return new LazyLabeledStatement(label, labeledStatement, _semanticModel, syntax, type, constantValue);
}
private IExpressionStatement CreateBoundExpressionStatementOperation(BoundExpressionStatement boundExpressionStatement)
......
......@@ -911,8 +911,8 @@ static void Main(string[] args)
Right: ILiteralExpression (Text: 1) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1')
Body: IBlockStatement (2 statements) (OperationKind.BlockStatement) (Syntax: '{ ... }')
IBranchStatement (BranchKind.GoTo, Label: stop) (OperationKind.BranchStatement) (Syntax: 'goto stop;')
ILabelStatement (Label: stop) (OperationKind.LabelStatement) (Syntax: 'stop: ... j = j + 1;')
LabeledStatement: IExpressionStatement (OperationKind.ExpressionStatement) (Syntax: 'j = j + 1;')
ILabeledStatement (Label: stop) (OperationKind.LabeledStatement) (Syntax: 'stop: ... j = j + 1;')
Statement: IExpressionStatement (OperationKind.ExpressionStatement) (Syntax: 'j = j + 1;')
Expression: ISimpleAssignmentExpression (OperationKind.SimpleAssignmentExpression, Type: System.Int32) (Syntax: 'j = j + 1')
Left: ILocalReferenceExpression: j (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'j')
Right: IBinaryOperatorExpression (BinaryOperationKind.IntegerAdd) (OperationKind.BinaryOperatorExpression, Type: System.Int32) (Syntax: 'j + 1')
......
......@@ -434,8 +434,8 @@ public static int GetFirstEvenNumber(int number)
IExpressionStatement (OperationKind.ExpressionStatement) (Syntax: 'number++;')
Expression: IIncrementExpression (UnaryOperandKind.IntegerPostfixIncrement) (OperationKind.IncrementExpression, Type: System.Int32) (Syntax: 'number++')
Left: IParameterReferenceExpression: number (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'number')
ILabelStatement (Label: Even) (OperationKind.LabelStatement) (Syntax: 'Even: ... urn number;')
LabeledStatement: IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'return number;')
ILabeledStatement (Label: Even) (OperationKind.LabeledStatement) (Syntax: 'Even: ... urn number;')
Statement: IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'return number;')
ReturnedValue: IParameterReferenceExpression: number (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'number')
";
VerifyOperationTreeForTest<WhileStatementSyntax>(source, expectedOperationTree);
......
......@@ -2583,10 +2583,10 @@ public LazyIsTypeExpression(Lazy<IOperation> operand, ITypeSymbol isType, Semant
/// <summary>
/// Represents a C# or VB label statement.
/// </summary>
internal abstract partial class BaseLabelStatement : Operation, ILabelStatement
internal abstract partial class BaseLabeledStatement : Operation, ILabeledStatement
{
protected BaseLabelStatement(ILabelSymbol label, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional<object> constantValue) :
base(OperationKind.LabelStatement, semanticModel, syntax, type, constantValue)
protected BaseLabeledStatement(ILabelSymbol label, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional<object> constantValue) :
base(OperationKind.LabeledStatement, semanticModel, syntax, type, constantValue)
{
Label = label;
}
......@@ -2594,55 +2594,55 @@ internal abstract partial class BaseLabelStatement : Operation, ILabelStatement
/// Label that can be the target of branches.
/// </summary>
public ILabelSymbol Label { get; }
protected abstract IOperation LabeledStatementImpl { get; }
protected abstract IOperation StatementImpl { get; }
public override IEnumerable<IOperation> Children
{
get
{
yield return LabeledStatement;
yield return Statement;
}
}
/// <summary>
/// Statement that has been labeled.
/// </summary>
public IOperation LabeledStatement => Operation.SetParentOperation(LabeledStatementImpl, this);
public IOperation Statement => Operation.SetParentOperation(StatementImpl, this);
public override void Accept(OperationVisitor visitor)
{
visitor.VisitLabelStatement(this);
visitor.VisitLabeledStatement(this);
}
public override TResult Accept<TArgument, TResult>(OperationVisitor<TArgument, TResult> visitor, TArgument argument)
{
return visitor.VisitLabelStatement(this, argument);
return visitor.VisitLabeledStatement(this, argument);
}
}
/// <summary>
/// Represents a C# or VB label statement.
/// </summary>
internal sealed partial class LabelStatement : BaseLabelStatement, ILabelStatement
internal sealed partial class LabeledStatement : BaseLabeledStatement, ILabeledStatement
{
public LabelStatement(ILabelSymbol label, IOperation labeledStatement, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional<object> constantValue) :
public LabeledStatement(ILabelSymbol label, IOperation labeledStatement, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional<object> constantValue) :
base(label, semanticModel, syntax, type, constantValue)
{
LabeledStatementImpl = labeledStatement;
StatementImpl = labeledStatement;
}
protected override IOperation LabeledStatementImpl { get; }
protected override IOperation StatementImpl { get; }
}
/// <summary>
/// Represents a C# or VB label statement.
/// </summary>
internal sealed partial class LazyLabelStatement : BaseLabelStatement, ILabelStatement
internal sealed partial class LazyLabeledStatement : BaseLabeledStatement, ILabeledStatement
{
private readonly Lazy<IOperation> _lazyLabeledStatement;
private readonly Lazy<IOperation> _lazyStatement;
public LazyLabelStatement(ILabelSymbol label, Lazy<IOperation> labeledStatement, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional<object> constantValue) : base(label, semanticModel, syntax, type, constantValue)
public LazyLabeledStatement(ILabelSymbol label, Lazy<IOperation> statement, SemanticModel semanticModel, SyntaxNode syntax, ITypeSymbol type, Optional<object> constantValue) : base(label, semanticModel, syntax, type, constantValue)
{
_lazyLabeledStatement = labeledStatement ?? throw new System.ArgumentNullException(nameof(labeledStatement));
_lazyStatement = statement ?? throw new System.ArgumentNullException(nameof(statement));
}
protected override IOperation LabeledStatementImpl => _lazyLabeledStatement.Value;
protected override IOperation StatementImpl => _lazyStatement.Value;
}
/// <summary>
......
......@@ -11,7 +11,7 @@ namespace Microsoft.CodeAnalysis.Semantics
/// This interface is reserved for implementation by its associated APIs. We reserve the right to
/// change it in the future.
/// </remarks>
public interface ILabelStatement : IOperation
public interface ILabeledStatement : IOperation
{
/// <summary>
/// Label that can be the target of branches.
......@@ -20,7 +20,7 @@ public interface ILabelStatement : IOperation
/// <summary>
/// Statement that has been labeled.
/// </summary>
IOperation LabeledStatement { get; }
IOperation Statement { get; }
}
}
......@@ -99,9 +99,9 @@ public override IOperation VisitForEachLoopStatement(IForEachLoopStatement opera
return new ForEachLoopStatement(operation.IterationVariable, Visit(operation.Collection), operation.LoopKind, Visit(operation.Body), ((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue);
}
public override IOperation VisitLabelStatement(ILabelStatement operation, object argument)
public override IOperation VisitLabeledStatement(ILabeledStatement operation, object argument)
{
return new LabelStatement(operation.Label, Visit(operation.LabeledStatement), ((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue);
return new LabeledStatement(operation.Label, Visit(operation.Statement), ((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue);
}
public override IOperation VisitBranchStatement(IBranchStatement operation, object argument)
......
......@@ -25,8 +25,8 @@ public enum OperationKind
IfStatement = 0x5,
/// <summary>Indicates an <see cref="ILoopStatement"/>.</summary>
LoopStatement = 0x6,
/// <summary>Indicates an <see cref="ILabelStatement"/>.</summary>
LabelStatement = 0x7,
/// <summary>Indicates an <see cref="ILabeledStatement"/>.</summary>
LabeledStatement = 0x7,
/// <summary>Indicates an <see cref="IBranchStatement"/>.</summary>
BranchStatement = 0x8,
/// <summary>Indicates an <see cref="IEmptyStatement"/>.</summary>
......
......@@ -90,7 +90,7 @@ public virtual void VisitForEachLoopStatement(IForEachLoopStatement operation)
DefaultVisit(operation);
}
public virtual void VisitLabelStatement(ILabelStatement operation)
public virtual void VisitLabeledStatement(ILabeledStatement operation)
{
DefaultVisit(operation);
}
......@@ -560,7 +560,7 @@ public virtual TResult VisitForEachLoopStatement(IForEachLoopStatement operation
return DefaultVisit(operation, argument);
}
public virtual TResult VisitLabelStatement(ILabelStatement operation, TArgument argument)
public virtual TResult VisitLabeledStatement(ILabeledStatement operation, TArgument argument)
{
return DefaultVisit(operation, argument);
}
......
......@@ -90,7 +90,7 @@ Microsoft.CodeAnalysis.OperationKind.InvalidStatement = 1 -> Microsoft.CodeAnaly
Microsoft.CodeAnalysis.OperationKind.InvocationExpression = 259 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.IsPatternExpression = 517 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.IsTypeExpression = 278 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LabelStatement = 7 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LabeledStatement = 7 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LambdaExpression = 273 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LiteralExpression = 257 -> Microsoft.CodeAnalysis.OperationKind
Microsoft.CodeAnalysis.OperationKind.LocalFunctionStatement = 49 -> Microsoft.CodeAnalysis.OperationKind
......@@ -482,9 +482,9 @@ Microsoft.CodeAnalysis.Semantics.IIsPatternExpression.Pattern.get -> Microsoft.C
Microsoft.CodeAnalysis.Semantics.IIsTypeExpression
Microsoft.CodeAnalysis.Semantics.IIsTypeExpression.IsType.get -> Microsoft.CodeAnalysis.ITypeSymbol
Microsoft.CodeAnalysis.Semantics.IIsTypeExpression.Operand.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.ILabelStatement
Microsoft.CodeAnalysis.Semantics.ILabelStatement.Label.get -> Microsoft.CodeAnalysis.ILabelSymbol
Microsoft.CodeAnalysis.Semantics.ILabelStatement.LabeledStatement.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.ILabeledStatement
Microsoft.CodeAnalysis.Semantics.ILabeledStatement.Label.get -> Microsoft.CodeAnalysis.ILabelSymbol
Microsoft.CodeAnalysis.Semantics.ILabeledStatement.Statement.get -> Microsoft.CodeAnalysis.IOperation
Microsoft.CodeAnalysis.Semantics.ILambdaExpression
Microsoft.CodeAnalysis.Semantics.ILambdaExpression.Body.get -> Microsoft.CodeAnalysis.Semantics.IBlockStatement
Microsoft.CodeAnalysis.Semantics.ILambdaExpression.Signature.get -> Microsoft.CodeAnalysis.IMethodSymbol
......@@ -818,7 +818,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitInvalidStatement(
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitInvocationExpression(Microsoft.CodeAnalysis.Semantics.IInvocationExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIsPatternExpression(Microsoft.CodeAnalysis.Semantics.IIsPatternExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitIsTypeExpression(Microsoft.CodeAnalysis.Semantics.IIsTypeExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLabelStatement(Microsoft.CodeAnalysis.Semantics.ILabelStatement operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLabeledStatement(Microsoft.CodeAnalysis.Semantics.ILabeledStatement operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLambdaExpression(Microsoft.CodeAnalysis.Semantics.ILambdaExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLiteralExpression(Microsoft.CodeAnalysis.Semantics.ILiteralExpression operation) -> void
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor.VisitLocalFunctionStatement(Microsoft.CodeAnalysis.Semantics.ILocalFunctionStatement operation) -> void
......@@ -908,7 +908,7 @@ virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.Vi
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitInvocationExpression(Microsoft.CodeAnalysis.Semantics.IInvocationExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitIsPatternExpression(Microsoft.CodeAnalysis.Semantics.IIsPatternExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitIsTypeExpression(Microsoft.CodeAnalysis.Semantics.IIsTypeExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitLabelStatement(Microsoft.CodeAnalysis.Semantics.ILabelStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitLabeledStatement(Microsoft.CodeAnalysis.Semantics.ILabeledStatement operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitLambdaExpression(Microsoft.CodeAnalysis.Semantics.ILambdaExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitLiteralExpression(Microsoft.CodeAnalysis.Semantics.ILiteralExpression operation, TArgument argument) -> TResult
virtual Microsoft.CodeAnalysis.Semantics.OperationVisitor<TArgument, TResult>.VisitLocalFunctionStatement(Microsoft.CodeAnalysis.Semantics.ILocalFunctionStatement operation, TArgument argument) -> TResult
......
......@@ -999,13 +999,13 @@ Namespace Microsoft.CodeAnalysis.Semantics
Return New LazyReturnStatement(OperationKind.YieldReturnStatement, returnedValue, _semanticModel, syntax, type, constantValue)
End Function
Private Function CreateBoundLabelStatementOperation(boundLabelStatement As BoundLabelStatement) As ILabelStatement
Private Function CreateBoundLabelStatementOperation(boundLabelStatement As BoundLabelStatement) As ILabeledStatement
Dim label As ILabelSymbol = boundLabelStatement.Label
Dim labeledStatement As Lazy(Of IOperation) = New Lazy(Of IOperation)(Function() Nothing)
Dim statement As Lazy(Of IOperation) = New Lazy(Of IOperation)(Function() Nothing)
Dim syntax As SyntaxNode = boundLabelStatement.Syntax
Dim type As ITypeSymbol = Nothing
Dim constantValue As [Optional](Of Object) = New [Optional](Of Object)()
Return New LazyLabelStatement(label, labeledStatement, _semanticModel, syntax, type, constantValue)
Return New LazyLabeledStatement(label, statement, _semanticModel, syntax, type, constantValue)
End Function
Private Function CreateBoundGotoStatementOperation(boundGotoStatement As BoundGotoStatement) As IBranchStatement
......
......@@ -417,7 +417,7 @@ IBlockStatement (6 statements, 4 locals) (OperationKind.BlockStatement, IsInvali
Left: IFieldReferenceExpression: C2.a As System.String (OperationKind.FieldReferenceExpression, Type: System.String, IsInvalid) (Syntax: 'a')
Instance Receiver: IOperation: (OperationKind.None, IsInvalid) (Syntax: 'New C2() Wi ... .a = "goo"}')
Right: ILiteralExpression (OperationKind.LiteralExpression, Type: System.String, Constant: "goo", IsInvalid) (Syntax: '"goo"')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub')
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub')
LabeledStatement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub')
ReturnedValue: null
......
......@@ -759,7 +759,7 @@ IBlockStatement (4 statements, 1 locals) (OperationKind.BlockStatement, IsInvali
Children(1):
IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: 'Unknown')
Children(0)
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub')
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub')
LabeledStatement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub')
ReturnedValue: null
......@@ -1131,7 +1131,7 @@ IObjectCreationExpression (Constructor: Sub C1..ctor()) (OperationKind.ObjectCre
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return .Field')
ReturnedValue: IFieldReferenceExpression: C1.Field As System.Int32 (OperationKind.FieldReferenceExpression, Type: System.Int32) (Syntax: '.Field')
Instance Receiver: IOperation: (OperationKind.None) (Syntax: 'New C1 With ... d Function}')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
LabeledStatement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Function')
......@@ -1403,7 +1403,7 @@ IObjectCreationExpression (Constructor: Sub C2..ctor()) (OperationKind.ObjectCre
Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null)
Operand: IFieldReferenceExpression: C2.Field As System.Func(Of System.Object) (OperationKind.FieldReferenceExpression, Type: System.Func(Of System.Object)) (Syntax: '.Field')
Instance Receiver: IOperation: (OperationKind.None) (Syntax: 'As New C2 W ... d Function}')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
LabeledStatement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Object) (Syntax: 'End Function')
......@@ -1420,7 +1420,7 @@ IObjectCreationExpression (Constructor: Sub C2..ctor()) (OperationKind.ObjectCre
Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null)
Operand: IFieldReferenceExpression: C2.Field As System.Func(Of System.Object) (OperationKind.FieldReferenceExpression, Type: System.Func(Of System.Object)) (Syntax: '.Field')
Instance Receiver: IOperation: (OperationKind.None) (Syntax: 'As New C2 W ... d Function}')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
LabeledStatement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Object) (Syntax: 'End Function')
......
......@@ -28,8 +28,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'Sub Meth
Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2')
IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If')
IfFalse: null
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub')
ReturnedValue: null
]]>.Value
......@@ -58,8 +58,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'Sub New(
Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2')
IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If')
IfFalse: null
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub')
ReturnedValue: null
]]>.Value
......@@ -93,8 +93,8 @@ IBlockStatement (4 statements, 1 locals) (OperationKind.BlockStatement) (Syntax:
IfFalse: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return True')
ReturnedValue: ILiteralExpression (Text: True) (OperationKind.LiteralExpression, Type: System.Boolean, Constant: True) (Syntax: 'True')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: Method (OperationKind.LocalReferenceExpression, Type: System.Boolean) (Syntax: 'End Function')
]]>.Value
......@@ -126,8 +126,8 @@ IBlockStatement (3 statements, 1 locals) (OperationKind.BlockStatement) (Syntax:
Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2')
IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If')
IfFalse: null
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Get')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Get')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Get')
ReturnedValue: ILocalReferenceExpression: Prop (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Get')
]]>.Value
......@@ -162,8 +162,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'Set(Valu
Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2')
IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If')
IfFalse: null
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Set')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Set')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Set')
ReturnedValue: null
]]>.Value
......@@ -202,8 +202,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'AddHandl
Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2')
IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If')
IfFalse: null
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End AddHandler')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End AddHandler')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End AddHandler')
ReturnedValue: null
]]>.Value
......@@ -242,8 +242,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'RemoveHa
Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2')
IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If')
IfFalse: null
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End RemoveHandler')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End RemoveHandler')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End RemoveHandler')
ReturnedValue: null
]]>.Value
......@@ -282,8 +282,8 @@ IBlockStatement (3 statements) (OperationKind.BlockStatement) (Syntax: 'RaiseEve
Right: ILiteralExpression (Text: 2) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 2) (Syntax: '2')
IfTrue: IBlockStatement (0 statements) (OperationKind.BlockStatement) (Syntax: 'If 1 > 2 Th ... End If')
IfFalse: null
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End RaiseEvent')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End RaiseEvent')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End RaiseEvent')
ReturnedValue: null
]]>.Value
......@@ -317,8 +317,8 @@ IBlockStatement (4 statements, 1 locals) (OperationKind.BlockStatement) (Syntax:
IfFalse: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return 0')
ReturnedValue: ILiteralExpression (Text: 0) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 0) (Syntax: '0')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Operator')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Operator')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Operator')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Operator')
]]>.Value
......
......@@ -764,8 +764,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio
Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null)
Operand: ILambdaExpression (Signature: Sub (i As System.Int32)) (OperationKind.LambdaExpression, Type: null) (Syntax: 'Sub(i As In ... End Sub')
IBlockStatement (2 statements) (OperationKind.BlockStatement) (Syntax: 'Sub(i As In ... End Sub')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub')
ReturnedValue: null
]]>.Value
......@@ -797,8 +797,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio
Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null)
Operand: ILambdaExpression (Signature: Sub ()) (OperationKind.LambdaExpression, Type: null) (Syntax: 'Sub()'BIND: ... End Sub')
IBlockStatement (2 statements) (OperationKind.BlockStatement) (Syntax: 'Sub()'BIND: ... End Sub')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub')
ReturnedValue: null
]]>.Value
......@@ -830,8 +830,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio
Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null)
Operand: ILambdaExpression (Signature: Sub (i As System.Int32)) (OperationKind.LambdaExpression, Type: null, IsInvalid) (Syntax: 'Sub(i As In ... End Sub')
IBlockStatement (2 statements) (OperationKind.BlockStatement, IsInvalid) (Syntax: 'Sub(i As In ... End Sub')
ILabelStatement (Label: exit) (OperationKind.LabelStatement, IsInvalid) (Syntax: 'End Sub')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement, IsInvalid) (Syntax: 'End Sub')
Statement: null
IReturnStatement (OperationKind.ReturnStatement, IsInvalid) (Syntax: 'End Sub')
ReturnedValue: null
]]>.Value
......@@ -871,8 +871,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio
Locals: Local_1: <anonymous local> As System.Int32
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return 1')
ReturnedValue: ILiteralExpression (Text: 1) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Function')
]]>.Value
......@@ -908,8 +908,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio
Locals: Local_1: <anonymous local> As System.Int32
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return 1')
ReturnedValue: ILiteralExpression (Text: 1) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'End Function')
]]>.Value
......@@ -941,8 +941,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio
Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null)
Operand: ILambdaExpression (Signature: Sub ()) (OperationKind.LambdaExpression, Type: null, IsInvalid) (Syntax: 'Sub()'BIND: ... End Sub')
IBlockStatement (2 statements) (OperationKind.BlockStatement, IsInvalid) (Syntax: 'Sub()'BIND: ... End Sub')
ILabelStatement (Label: exit) (OperationKind.LabelStatement, IsInvalid) (Syntax: 'End Sub')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement, IsInvalid) (Syntax: 'End Sub')
Statement: null
IReturnStatement (OperationKind.ReturnStatement, IsInvalid) (Syntax: 'End Sub')
ReturnedValue: null
]]>.Value
......@@ -2104,8 +2104,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio
ReturnedValue: IBinaryOperatorExpression (BinaryOperationKind.IntegerLessThan) (OperationKind.BinaryOperatorExpression, Type: System.Boolean) (Syntax: 'num < 5')
Left: IParameterReferenceExpression: num (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'num')
Right: ILiteralExpression (Text: 5) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 5) (Syntax: '5')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'Function(num) num < 5')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'Function(num) num < 5')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Function(num) num < 5')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Boolean) (Syntax: 'Function(num) num < 5')
]]>.Value
......@@ -2144,8 +2144,8 @@ IVariableDeclarationStatement (1 declarations) (OperationKind.VariableDeclaratio
ReturnedValue: IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.ConversionExpression, Type: System.Boolean, IsInvalid) (Syntax: 'num')
Conversion: CommonConversion (Exists: False, IsIdentity: False, IsNumeric: False, IsReference: False, IsUserDefined: False) (MethodSymbol: null)
Operand: IParameterReferenceExpression: num (OperationKind.ParameterReferenceExpression, Type: System.Int32, IsInvalid) (Syntax: 'num')
ILabelStatement (Label: exit) (OperationKind.LabelStatement, IsInvalid) (Syntax: 'Function(num) num')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement, IsInvalid) (Syntax: 'Function(num) num')
Statement: null
IReturnStatement (OperationKind.ReturnStatement, IsInvalid) (Syntax: 'Function(num) num')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Boolean, IsInvalid) (Syntax: 'Function(num) num')
]]>.Value
......
......@@ -129,8 +129,8 @@ IBlockStatement (9 statements, 7 locals) (OperationKind.BlockStatement, IsInvali
IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: '""')
Children(1):
ILiteralExpression (OperationKind.LiteralExpression, Type: System.String, Constant: "", IsInvalid) (Syntax: '""')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub')
ReturnedValue: null
]]>.Value
......
......@@ -385,8 +385,8 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve
Locals: Local_1: <anonymous local> As System.Object
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'x')
ReturnedValue: IParameterReferenceExpression: x (OperationKind.ParameterReferenceExpression, Type: System.Object) (Syntax: 'x')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'Function() x')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'Function() x')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Function() x')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Object) (Syntax: 'Function() x')
]]>.Value
......
......@@ -433,8 +433,8 @@ IWhileUntilLoopStatement (IsTopTest: True, IsWhile: True) (LoopKind.WhileUntil)
Expression: ICompoundAssignmentExpression (BinaryOperationKind.IntegerAdd) (OperationKind.CompoundAssignmentExpression, Type: System.Int32) (Syntax: 'number += 1')
Left: IParameterReferenceExpression: number (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'number')
Right: ILiteralExpression (Text: 1) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 1) (Syntax: '1')
ILabelStatement (Label: Even) (OperationKind.LabelStatement) (Syntax: 'Even:')
LabeledStatement: null
ILabeledStatement (Label: Even) (OperationKind.LabeledStatement) (Syntax: 'Even:')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Return number')
ReturnedValue: IParameterReferenceExpression: number (OperationKind.ParameterReferenceExpression, Type: System.Int32) (Syntax: 'number')
]]>.Value
......
......@@ -287,8 +287,8 @@ IConversionExpression (Implicit, TryCast: False, Unchecked) (OperationKind.Conve
IInvocationExpression (Sub Program.F()) (OperationKind.InvocationExpression, Type: System.Void, IsInvalid) (Syntax: 'F()')
Instance Receiver: null
Arguments(0)
ILabelStatement (Label: exit) (OperationKind.LabelStatement, IsInvalid) (Syntax: 'Function() F()')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement, IsInvalid) (Syntax: 'Function() F()')
Statement: null
IReturnStatement (OperationKind.ReturnStatement, IsInvalid) (Syntax: 'Function() F()')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: ?, IsInvalid) (Syntax: 'Function() F()')]]>.Value
......
......@@ -126,8 +126,8 @@ IBlockStatement (4 statements, 2 locals) (OperationKind.BlockStatement, IsInvali
IArrayInitializer (1 elements) (OperationKind.ArrayInitializer, IsInvalid) (Syntax: '{tr}')
Element Values(1):
IParameterReferenceExpression: tr (OperationKind.ParameterReferenceExpression, Type: System.TypedReference, IsInvalid) (Syntax: 'tr')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub')
ReturnedValue: null
]]>.Value
......@@ -628,8 +628,8 @@ IBlockStatement (4 statements, 2 locals) (OperationKind.BlockStatement, IsInvali
Initializer: IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpression, Type: <anonymous type: __ As System.Collections.Generic.IEnumerable(Of System.Xml.Linq.XElement)>) (Syntax: 'New With {<a/>.<__>}')
Initializers(1):
IOperation: (OperationKind.None) (Syntax: '<a/>.<__>')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Sub')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Sub')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Sub')
ReturnedValue: null
]]>.Value
......@@ -835,8 +835,8 @@ IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpress
Instance Receiver: IPropertyReferenceExpression: ReadOnly Property <anonymous type: Key x As System.String, Key a As System.String>.x As System.String (Static) (OperationKind.PropertyReferenceExpression, Type: System.String, IsInvalid) (Syntax: '.x')
Instance Receiver: null
Arguments(0)
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function')
Arguments(0)
......@@ -889,8 +889,8 @@ IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpress
Children(1):
IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: '.a')
Children(0)
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function')
Arguments(0)
......@@ -943,8 +943,8 @@ IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpress
Children(1):
IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: '.x')
Children(0)
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function')
Arguments(0)
......@@ -1006,13 +1006,13 @@ IAnonymousObjectCreationExpression (OperationKind.AnonymousObjectCreationExpress
Children(1):
IInvalidExpression (OperationKind.InvalidExpression, Type: ?, IsInvalid) (Syntax: '.x')
Children(0)
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function')
Arguments(0)
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'End Function')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'End Function')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'End Function')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.String) (Syntax: 'End Function')
Arguments(0)
......
......@@ -597,8 +597,8 @@ ISwitchStatement (2 cases) (OperationKind.SwitchStatement) (Syntax: 'Select Case
Locals: Local_1: <anonymous local> As System.Int32
IReturnStatement (OperationKind.ReturnStatement) (Syntax: '5')
ReturnedValue: ILiteralExpression (Text: 5) (OperationKind.LiteralExpression, Type: System.Int32, Constant: 5) (Syntax: '5')
ILabelStatement (Label: exit) (OperationKind.LabelStatement) (Syntax: 'Function() 5')
LabeledStatement: null
ILabeledStatement (Label: exit) (OperationKind.LabeledStatement) (Syntax: 'Function() 5')
Statement: null
IReturnStatement (OperationKind.ReturnStatement) (Syntax: 'Function() 5')
ReturnedValue: ILocalReferenceExpression: (OperationKind.LocalReferenceExpression, Type: System.Int32) (Syntax: 'Function() 5')
Body:
......
......@@ -470,9 +470,9 @@ public override void VisitForEachLoopStatement(IForEachLoopStatement operation)
Visit(operation.Body, "Body");
}
public override void VisitLabelStatement(ILabelStatement operation)
public override void VisitLabeledStatement(ILabeledStatement operation)
{
LogString(nameof(ILabelStatement));
LogString(nameof(ILabeledStatement));
// TODO: Put a better workaround to skip compiler generated labels.
if (!operation.Label.IsImplicitlyDeclared)
......@@ -482,7 +482,7 @@ public override void VisitLabelStatement(ILabelStatement operation)
LogCommonPropertiesAndNewLine(operation);
Visit(operation.LabeledStatement, "LabeledStatement");
Visit(operation.Statement, "Statement");
}
public override void VisitBranchStatement(IBranchStatement operation)
......
......@@ -129,11 +129,11 @@ public override void VisitForEachLoopStatement(IForEachLoopStatement operation)
base.VisitForEachLoopStatement(operation);
}
public override void VisitLabelStatement(ILabelStatement operation)
public override void VisitLabeledStatement(ILabeledStatement operation)
{
var label = operation.Label;
base.VisitLabelStatement(operation);
base.VisitLabeledStatement(operation);
}
public override void VisitBranchStatement(IBranchStatement operation)
......
......@@ -1468,13 +1468,13 @@ public sealed override void Initialize(AnalysisContext context)
context.RegisterOperationAction(
(operationContext) =>
{
ILabelSymbol label = ((ILabelStatement)operationContext.Operation).Label;
ILabelSymbol label = ((ILabeledStatement)operationContext.Operation).Label;
if (label.Name == "Wilma" || label.Name == "Betty")
{
operationContext.ReportDiagnostic(Diagnostic.Create(LabelDescriptor, operationContext.Operation.Syntax.GetLocation()));
}
},
OperationKind.LabelStatement);
OperationKind.LabeledStatement);
context.RegisterOperationAction(
(operationContext) =>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册