Beispiel #1
0
        public Node expr_cond()
        {
            //Console.WriteLine("expr_cond");
            var expr_or_ = expr_or();

            while (CurrentToken == TokenCategory.INTERROGATION)
            {
                //Console.WriteLine("while1");
                var interrogation = new Interrogation_();
                var r             = Expect(TokenCategory.INTERROGATION);
                interrogation.AnchorToken = r;
                interrogation.Add(expr());
                var Colon = new Colon_();
                var m     = Expect(TokenCategory.COLON);
                Colon.AnchorToken = m;
                Colon.Add(expr());
                interrogation.Add(Colon);
                return(interrogation);
            }
            return(expr_or_);
        }
Beispiel #2
0
 public void Visit(Colon_ node, int modo)
 {
     VisitChildren(node, modo);
 }