/// <remarks> /// Used to determine whether it would be appropriate to use the binder for the statement (if any). /// Not used to determine whether the position is syntactically within the statement. /// </remarks> internal static bool IsInCatchFilterScope( int position, CatchFilterClauseSyntax filterClause ) { Debug.Assert(filterClause != null); return(IsBetweenTokens( position, filterClause.OpenParenToken, filterClause.CloseParenToken )); }
public override void VisitCatchFilterClause(CatchFilterClauseSyntax node) { // No variables can be defined in a filter atm. // Note - this needs to be updated when declaration expressions are implemented. }
private BoundExpression BindCatchFilter(CatchFilterClauseSyntax filter, DiagnosticBag diagnostics) { BoundExpression boundFilter = this.BindBooleanExpression(filter.FilterExpression, diagnostics); if (boundFilter.ConstantValue != ConstantValue.NotAvailable) { Error(diagnostics, ErrorCode.WRN_FilterIsConstant, filter.FilterExpression); } boundFilter = new BoundSequencePointExpression(filter, boundFilter, boundFilter.Type); return boundFilter; }
public override void VisitCatchFilterClause(CatchFilterClauseSyntax node) { Visit(node.FilterExpression); }
private IEnumerable<ITypeSymbol> InferTypeInCatchFilterClause(CatchFilterClauseSyntax catchFilterClause, SyntaxToken? previousToken = null) { // If we have a position, it has to be after "if (" if (previousToken.HasValue && previousToken.Value != catchFilterClause.OpenParenToken) { return SpecializedCollections.EmptyEnumerable<ITypeSymbol>(); } return SpecializedCollections.SingletonEnumerable(this.Compilation.GetSpecialType(SpecialType.System_Boolean)); }
/// <remarks> /// Used to determine whether it would be appropriate to use the binder for the statement (if any). /// Not used to determine whether the position is syntactically within the statement. /// </remarks> internal static bool IsInCatchFilterScope(int position, CatchFilterClauseSyntax filterClause) { Debug.Assert(filterClause != null); return IsBetweenTokens(position, filterClause.OpenParenToken, filterClause.CloseParenToken); }
/// <summary> /// /// </summary> /// <param name="node"></param> public override sealed void VisitCatchFilterClause(CatchFilterClauseSyntax node) { this.OnNodeVisited(node, this.type.IsInstanceOfType(node)); base.VisitCatchFilterClause(node); }
/// <summary> /// /// </summary> /// <param name="node"></param> public override sealed void VisitCatchFilterClause(CatchFilterClauseSyntax node) { this.OnNodeVisited(node); if (!this.traverseRootOnly) base.VisitCatchFilterClause(node); }
// // Summary: // Called when the visitor visits a CatchFilterClauseSyntax node. public virtual void VisitCatchFilterClause(CatchFilterClauseSyntax node);