Пример #1
0
        public override void ExitCondition([NotNull] ClojureObrParser.ConditionContext context)
        {
            //
            ExprNode condExpr = (ExprNode)TypedNodes.Get(context.children[2]);
            ExprNode thenExpr = (ExprNode)TypedNodes.Get(context.children[3]);
            ExprNode elseExpr = null;

            if (context.children.Count > 5)
            {
                elseExpr = (ExprNode)TypedNodes.Get(context.children[4]);
            }
            CondNode node = new CondNode(condExpr, thenExpr, elseExpr);

            TypedNodes.Put(context, node);
        }
Пример #2
0
 public override void EnterCondition([NotNull] ClojureObrParser.ConditionContext context)
 {
     //
 }