Example #1
0
		/////////////////////////////////////////////////////////////////////////////

		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;
		}
Example #2
0
File: ETB.cs Project: jmclain/Nmp
		/////////////////////////////////////////////////////////////////////////////

		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;
		}
Example #3
0
		public abstract string DumpUnnamedMethodCallExpression( UnnamedMethodCallExpression exp );
Example #4
0
		public abstract object EvalUnnamedMethodCallExpression( object obj, UnnamedMethodCallExpression exp );
Example #5
0
		/////////////////////////////////////////////////////////////////////////////

		public override string DumpUnnamedMethodCallExpression( UnnamedMethodCallExpression exp )
		{
			return string.Format( "macro|()result|[]result({0})", Arguments(exp.Arguments) );
		}