Search in sources :

Example 1 with Set_expressionContext

use of jetbrick.template.parser.grammer.JetTemplateParser.Set_expressionContext in project jetbrick-template-1x by subchen.

the class JetTemplateCodeVisitor method visitSet_directive.

@Override
public Code visitSet_directive(Set_directiveContext ctx) {
    List<Set_expressionContext> set_expression_list = ctx.set_expression();
    BlockCode code = scopeCode.createBlockCode(set_expression_list.size());
    for (Set_expressionContext node : set_expression_list) {
        Code c = node.accept(this);
        if (c != null) {
            code.addChild(c);
        }
    }
    return code;
}
Also used : BlockCode(jetbrick.template.parser.code.BlockCode) Set_expressionContext(jetbrick.template.parser.grammer.JetTemplateParser.Set_expressionContext) ScopeCode(jetbrick.template.parser.code.ScopeCode) BlockCode(jetbrick.template.parser.code.BlockCode) SegmentListCode(jetbrick.template.parser.code.SegmentListCode) TemplateClassCode(jetbrick.template.parser.code.TemplateClassCode) TextCode(jetbrick.template.parser.code.TextCode) ForExpressionCode(jetbrick.template.parser.code.ForExpressionCode) SegmentCode(jetbrick.template.parser.code.SegmentCode) MacroCode(jetbrick.template.parser.code.MacroCode) Code(jetbrick.template.parser.code.Code) DefineExpressionCode(jetbrick.template.parser.code.DefineExpressionCode) TagCode(jetbrick.template.parser.code.TagCode)

Aggregations

BlockCode (jetbrick.template.parser.code.BlockCode)1 Code (jetbrick.template.parser.code.Code)1 DefineExpressionCode (jetbrick.template.parser.code.DefineExpressionCode)1 ForExpressionCode (jetbrick.template.parser.code.ForExpressionCode)1 MacroCode (jetbrick.template.parser.code.MacroCode)1 ScopeCode (jetbrick.template.parser.code.ScopeCode)1 SegmentCode (jetbrick.template.parser.code.SegmentCode)1 SegmentListCode (jetbrick.template.parser.code.SegmentListCode)1 TagCode (jetbrick.template.parser.code.TagCode)1 TemplateClassCode (jetbrick.template.parser.code.TemplateClassCode)1 TextCode (jetbrick.template.parser.code.TextCode)1 Set_expressionContext (jetbrick.template.parser.grammer.JetTemplateParser.Set_expressionContext)1