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; }
public IncludeRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree) : base(exprMatchResult, exprMatchTree) { _templatePathVar = ExprMatchTree.GetFilteredVariable(GROUP_TEMPLATE_FILE); }
public ForLoopRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree) : base(exprMatchResult, exprMatchTree) { _listVar = ExprMatchTree.GetFilteredVariable(GROUP_FOR_LIST); _loopVariableName = ExprMatchTree.GetGroupValue(GROUP_FOR_VAR); }
public VariableRenderer(Parser.ExprMatchResult exprMatchResult, ExprMatchTree exprMatchTree) : base(exprMatchResult, exprMatchTree) { _variable = ExprMatchTree.GetFilteredVariable(GROUP_VARIABLE_IDENT); }
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); } }