Beispiel #1
0
		/////////////////////////////////////////////////////////////////////////////

		protected Expression IndexMember( bool isRootNode, string memberName, bool validToken, IInput input )
		{
			// ******
			Expression expression = null;

			//IArgumentsProcessor ap = new ArgumentsProcessor( argScanner, recognizer );
			IArgumentsProcessor ap = new ArgumentsProcessor( scanner, recognizer );

			//NmpStringList strArgs = argScanner( input, RecognizedCharType.CloseBracketChar );
			NmpStringList strArgs = scanner.ArgScanner( input, RecognizedCharType.CloseBracketChar );

			// ******
			if( ! validToken ) {
				//
				// IndexResult
				//
				return new UnnamedIndexExpression( ap, strArgs );
			}
			else {
				if( isRootNode ) {
					expression = new UnnamedIndexExpression(memberName, ap, strArgs );
				}
				else {
					expression = new IndexExpression( memberName, ap, strArgs );
				}
			}

			// ******
			return expression;
		}
Beispiel #2
0
		/////////////////////////////////////////////////////////////////////////////

		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;
		}