Skip to content

Commit bd5a6b5

Browse files
committed
more internal
1 parent d8074dc commit bd5a6b5

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

src/Hyperbee.Expressions/Transformation/AwaitBinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Hyperbee.Expressions.Transformation;
66
internal delegate TAwaiter AwaitBinderGetAwaiterDelegate<TAwaitable, out TAwaiter>( ref TAwaitable awaitable, bool configureAwait );
77
internal delegate TResult AwaitBinderGetResultDelegate<TAwaiter, out TResult>( ref TAwaiter awaiter );
88

9-
public class AwaitBinder
9+
internal class AwaitBinder
1010
{
1111
public MethodInfo WaitMethod { get; }
1212
public MethodInfo GetAwaiterMethod { get; }

src/Hyperbee.Expressions/Transformation/LoweringResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal record LoweringResult
1313

1414
public IEnumerable<NodeExpression> Nodes => Scopes.SelectMany( scope => scope.Nodes );
1515

16-
internal string DebugView
16+
internal string DebugView //BF ME - does this still have value?
1717
{
1818
get
1919
{

src/Hyperbee.Expressions/Transformation/LoweringVisitor.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System.Diagnostics;
2-
using System.Linq.Expressions;
1+
using System.Linq.Expressions;
32
using System.Runtime.CompilerServices;
43
using Hyperbee.Expressions.Transformation.Transitions;
54
using Hyperbee.Expressions.Visitors;
@@ -15,7 +14,7 @@ internal class LoweringVisitor : ExpressionVisitor
1514
private int _awaitCount;
1615

1716
private readonly StateContext _states = new( InitialCapacity );
18-
private readonly ExpressionDependencyMatcher _dependencyMatcher = new( expr => expr is AwaitExpression || expr is AsyncBlockExpression );
17+
private readonly ExpressionMatcher _expressionMatcher = new( expr => expr is AwaitExpression || expr is AsyncBlockExpression );
1918

2019
private VariableResolver _variableResolver;
2120

@@ -99,7 +98,7 @@ private void UpdateTailState( Expression visited, NodeExpression defaultTarget =
9998
[MethodImpl( MethodImplOptions.AggressiveInlining )]
10099
private bool RequiresLowering( Expression node )
101100
{
102-
return _dependencyMatcher.HasMatch( node );
101+
return _expressionMatcher.HasMatch( node );
103102
}
104103

105104
// Override methods for specific expression types

src/Hyperbee.Expressions/Visitors/ExpressionDependencyMatcher.cs renamed to src/Hyperbee.Expressions/Visitors/ExpressionMatcher.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
namespace Hyperbee.Expressions.Visitors;
44

5-
internal class ExpressionDependencyMatcher : ExpressionVisitor
5+
internal class ExpressionMatcher : ExpressionVisitor
66
{
77
private readonly Dictionary<Expression, int> _countDictionary = [];
88
private readonly Func<Expression, bool> _matchPredicate;
99
private int _counter;
1010

11-
public ExpressionDependencyMatcher( Func<Expression, bool> matchPredicate )
11+
public ExpressionMatcher( Func<Expression, bool> matchPredicate )
1212
{
1313
_matchPredicate = matchPredicate ?? throw new ArgumentNullException( nameof( matchPredicate ) );
1414
}

test/Hyperbee.Expressions.Tests/ExpressionDependencyMatcherTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void ExpressionDependencyMatcher_ShouldFindAwaits()
2929
);
3030

3131
var rootExpr = Block( blockAsyncExpr );
32-
var counter = new ExpressionDependencyMatcher( expr => expr is AsyncBlockExpression || expr is AwaitExpression );
32+
var counter = new ExpressionMatcher( expr => expr is AsyncBlockExpression || expr is AwaitExpression );
3333

3434
// Act
3535
var rootExprCount = counter.MatchCount( rootExpr );

0 commit comments

Comments
 (0)