Beispiel #1
0
        private void Init()
        {
            if (_options != null)
            {
                RTParsingContext context = new RTParsingContext(_factory);
                var exprList = new RTExpressionList();
                exprList.Parse(_templateExpr, 0, context); //parse should not throw an exception
                _interpreter = exprList;

                _options = null;
                _templateExpr = null;

                if (!_interpreter.CanExecute)
                {
                    _parsingException = new RTParsingException(context.Errors, ErrorMessages.Template_Parsing_Error);
                }
            }
            if (_parsingException != null) throw _parsingException;
        }
Beispiel #2
0
        private void Init()
        {
            if (_mergeOptions != null)
            {
                RTParsingContext context = new RTParsingContext(_factory);
                var exprList = new RTExpressionList();
                exprList.Parse(_mergeExpr, 0, context);
                _interpreter = exprList;

                _mergeOptions = null; //not needed anymore
                _mergeExpr = null;

                if (!_interpreter.CanExecute)
                {
                    _parsingException = new RTParsingException(context.Errors, ErrorMessages.Post_Parsing_Error);
                }
            }
            if (_parsingException != null) throw _parsingException;
        }