

package com.huawei.streaming.cql.semanticanalyzer.parser.visitor;

import org.antlr.v4.runtime.misc.NotNull;

import com.huawei.streaming.cql.semanticanalyzer.parser.CQLParser;
import com.huawei.streaming.cql.semanticanalyzer.parser.context.CaseWhenBodyThenBodyContext;

/**
 * case when 语法遍历
 * 
 */
public class CaseWhenBodyThenBodyVisitor extends AbsCQLParserBaseVisitor<CaseWhenBodyThenBodyContext>
{
    private CaseWhenBodyThenBodyContext context = null;
    
    /**
     * <默认构造函数>
     */
    public CaseWhenBodyThenBodyVisitor()
    {
        context = new CaseWhenBodyThenBodyContext();
    }
    
    /**
     * {@inheritDoc}
     */
    @Override
    protected CaseWhenBodyThenBodyContext defaultResult()
    {
        return context;
    }
    
    /**
     * {@inheritDoc}
     */
    @Override
    public CaseWhenBodyThenBodyContext visitExpression(@NotNull CQLParser.ExpressionContext ctx)
    {
        ExpressionVisitor visitor = new ExpressionVisitor();
        context.setExpression(visitor.visit(ctx));
        return context;
    }
}
