示例#1
0
            private static string ProcessExpression(Context ctx, string expression, PostProcessExpressionDelegate postProcessDelegate)
            {
                // Execute macro expansion
                //expression = ctx.ExecuteMacroExpansion(expression);
                // Post-process expression
                if (postProcessDelegate != null)
                {
                    expression = postProcessDelegate(ctx, expression);
                }

                // Resolve expression by parenthetical grouping (highest priority)
                mEvaluatorContext = ctx;
                while (sGroupExpRegex.Matches(expression).Count > 0)
                {
                    expression = sGroupExpRegex.Replace(expression, ExpressionEvaluator);
                }
                mEvaluatorContext = null;

                return(expression);
            }
			private static string ProcessExpression(Context ctx, string expression, PostProcessExpressionDelegate postProcessDelegate)
			{
				// Execute macro expansion
				//expression = ctx.ExecuteMacroExpansion(expression);
				// Post-process expression
				if (postProcessDelegate != null)
					expression = postProcessDelegate(ctx, expression);

				// Resolve expression by parenthetical grouping (highest priority)
				mEvaluatorContext = ctx;
				while (sGroupExpRegex.Matches(expression).Count > 0)
					expression = sGroupExpRegex.Replace(expression, ExpressionEvaluator);
				mEvaluatorContext = null;

				return (expression);
			}