File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed
CodingSeb.ExpressionEvaluator.Tests
CodingSeb.ExpressionEvaluator Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change 3636 <Compile Update =" TestsUtils\StructForTest2.cs" >
3737 <SubType >Code</SubType >
3838 </Compile >
39+ <Compile Update =" TestsUtils\XExpressionEvaluator2.cs" >
40+ <SubType >Code</SubType >
41+ </Compile >
3942 <Compile Update =" TestsUtils\XExpressionEvaluator1.cs" >
4043 <SubType >Code</SubType >
4144 </Compile >
Original file line number Diff line number Diff line change 1+ namespace CodingSeb . ExpressionEvaluator . Tests
2+ {
3+ public class XExpressionEvaluator2 : ExpressionEvaluator
4+ {
5+ protected override void Init ( )
6+ {
7+ operatorsDictionary . Add ( "#" , XExpressionOperator2 . Sharp ) ;
8+ operatorsDictionary . Add ( "love" , XExpressionOperator2 . Love ) ;
9+ }
10+ }
11+
12+ public class XExpressionOperator2 : ExpressionOperator
13+ {
14+ public static readonly ExpressionOperator Sharp = new XExpressionOperator2 ( ) ;
15+ public static readonly ExpressionOperator Love = new XExpressionOperator2 ( ) ;
16+ }
17+ }
Original file line number Diff line number Diff line change @@ -2629,7 +2629,7 @@ protected virtual object ProcessStack(Stack<object> stack)
26292629 {
26302630 ExpressionOperator eOp = operatorEvalutationsDict . Keys . ToList ( ) [ opi ] ;
26312631
2632- if ( ( list [ i ] as ExpressionOperator ) == eOp )
2632+ if ( ( list [ i ] as ExpressionOperator ) == eOp )
26332633 {
26342634 if ( rightOperandOnlyOperatorsEvaluationDictionary . ContainsKey ( eOp ) )
26352635 {
@@ -2648,7 +2648,7 @@ protected virtual object ProcessStack(Stack<object> stack)
26482648 list [ i ] = operatorEvalutationsDict [ eOp ] ( ( dynamic ) list [ i + 1 ] , ( dynamic ) list [ i - 1 ] ) ;
26492649 list . RemoveAt ( i + 1 ) ;
26502650 list . RemoveAt ( i - 1 ) ;
2651- i -= 1 ;
2651+ i -- ;
26522652 break ;
26532653 }
26542654 }
@@ -3372,11 +3372,6 @@ protected ExpressionOperator()
33723372 OperatorValue = indexer ;
33733373 }
33743374
3375- protected ExpressionOperator ( uint value )
3376- {
3377- OperatorValue = value ;
3378- }
3379-
33803375 protected uint OperatorValue { get ; }
33813376
33823377 public static readonly ExpressionOperator Plus = new ExpressionOperator ( ) ;
You can’t perform that action at this time.
0 commit comments