コード例 #1
0
        public UrlRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
            : base(exprMatchResult, exprMatchTree)
        {
            _urlNameVar = ExprMatchTree.GetFilteredVariable(GROUP_URL_NAME);
            _urlNamedArgsVar = ExprMatchTree.GetFilteredAssignmentList(GROUP_URL_NAMED_ARGS);
            _urlPositionalArgsVar = ExprMatchTree.GetFilteredVariableList(GROUP_URL_POSITIONAL_ARGS);

            _namedArgsCount = _urlNamedArgsVar != null ? _urlNamedArgsVar.Count : 0;
            _positionalArgsCount = _urlPositionalArgsVar != null ? _urlPositionalArgsVar.Count : 0;
        }
コード例 #2
0
 public IncludeRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
     : base(exprMatchResult, exprMatchTree)
 {
     _templatePathVar = ExprMatchTree.GetFilteredVariable(GROUP_TEMPLATE_FILE);
 }
コード例 #3
0
 public ExprRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
 {
     ExprMatchResult = exprMatchResult;
     ExprMatchTree = exprMatchTree;
 }
コード例 #4
0
 public ExprEmptyRenderer(string name, ExprRenderType renderType, ExprType type, Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
     : base(exprMatchResult, exprMatchTree)
 {
     _name = name;
     _renderType = renderType;
     _type = type;
 }
コード例 #5
0
 public ForLoopRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
     : base(exprMatchResult, exprMatchTree)
 {
     _listVar = ExprMatchTree.GetFilteredVariable(GROUP_FOR_LIST);
     _loopVariableName = ExprMatchTree.GetGroupValue(GROUP_FOR_VAR);
 }
コード例 #6
0
 public VariableRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
     : base(exprMatchResult, exprMatchTree)
 {
     _variable = ExprMatchTree.GetFilteredVariable(GROUP_VARIABLE_IDENT);
 }
コード例 #7
0
 public IfElseRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
     : base(exprMatchResult, exprMatchTree)
 {
 }
コード例 #8
0
 public FilterLoaderRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
     : base(exprMatchResult, exprMatchTree)
 {
     _filterName = ExprMatchTree.GetGroupValue(GROUP_FILTER_NAME);
 }
コード例 #9
0
 public SpecialTagRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
     : base(exprMatchResult, exprMatchTree)
 {
     _specialTagName = ExprMatchTree.GetGroupValue(GROUP_SPE_TAG_NAME);
 }
コード例 #10
0
ファイル: IfRenderer.cs プロジェクト: rahulchrty/badr-project
        public IfRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
            : base(exprMatchResult, exprMatchTree)
        {
            _oredConditions = new List<List<IfCondition>> ();

            List<IfCondition> andedConditions = new List<IfCondition> ();
            andedConditions.Add (new IfCondition (exprMatchTree.GetGroup(GROUP_IF_COND)));

            List<ExprMatchGroup> booleanOpIfCondition = exprMatchTree.GetGroupList (GROUP_IF_COND_BOOLEAN);
            if (booleanOpIfCondition != null)
            {
                foreach (ExprMatchGroup boolOpifConditionGroup in booleanOpIfCondition)
                {
                    if (boolOpifConditionGroup.GetGroupValue (GROUP_COND_BOOLEAN_OP) == "or")
                    {
                        _oredConditions.Add (andedConditions);
                        andedConditions = new List<IfCondition> ();
                    }

                    andedConditions.Add (new IfCondition (boolOpifConditionGroup.GetGroup(GROUP_IF_COND)));
                }

            }

            _oredConditions.Add (andedConditions);
        }