///////////////////////////////////////////////////////////////////////////// public override object EvalUnnamedMethodCallExpression( object objIn, UnnamedMethodCallExpression exp ) { // ****** // // expression: macro.something( x )( y ), or macro.something[ z ]( zz ) // var args = EvaluateArguments( exp.Arguments ); object objResult = Invokers.EvalMethodCallHelper( objIn, args ); CheckNullResult( objResult, objIn, "method result expression" ); return objResult; }
///////////////////////////////////////////////////////////////////////////// protected Expression MethodCall( bool isRootNode, string methodName, bool validToken, IInput input ) { // ****** Expression expression = null; IArgumentsProcessor ap = new ArgumentsProcessor( scanner, recognizer ); NmpStringList strArgs = scanner.ArgScanner( input, RecognizedCharType.CloseParenChar ); // ****** if( ! validToken ) { // // IndexResult // return new UnnamedMethodCallExpression( ap, strArgs ); } else { if( isRootNode ) { expression = new UnnamedMethodCallExpression( methodName, ap, strArgs ); } else { expression = new MethodCallExpression( methodName, ap, strArgs ); } } // ****** return expression; }
public abstract string DumpUnnamedMethodCallExpression( UnnamedMethodCallExpression exp );
public abstract object EvalUnnamedMethodCallExpression( object obj, UnnamedMethodCallExpression exp );
///////////////////////////////////////////////////////////////////////////// public override string DumpUnnamedMethodCallExpression( UnnamedMethodCallExpression exp ) { return string.Format( "macro|()result|[]result({0})", Arguments(exp.Arguments) ); }