예제 #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 ForLoopRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
     : base(exprMatchResult, exprMatchTree)
 {
     _listVar = ExprMatchTree.GetFilteredVariable(GROUP_FOR_LIST);
     _loopVariableName = ExprMatchTree.GetGroupValue(GROUP_FOR_VAR);
 }
예제 #4
0
 public VariableRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree)
     : base(exprMatchResult, exprMatchTree)
 {
     _variable = ExprMatchTree.GetFilteredVariable(GROUP_VARIABLE_IDENT);
 }
예제 #5
0
            public IfCondition(ExprMatchGroup ifConditionGroup)
            {
                IsNegated = ifConditionGroup.GetGroupValue(GROUP_IF_NOT) == "not";

                LeftVar = ifConditionGroup.GetFilteredVariable(GROUP_IF_L_VAR);
                if(LeftVar == null)
                    LeftVar = ifConditionGroup.GetAsFilteredVariable();
                else
                {
                    RightVar = ifConditionGroup.GetFilteredVariable(GROUP_IF_R_VAR);
                    Operator = ifConditionGroup.GetGroupValue(GROUP_IF_OP);
                }
            }