示例#1
0
        private Expr Expression()
        {
            Expr expr = Assignment();

            while (Match(COMMA))
            {
                Expr right = Assignment();
                expr = new Expr.Comma(expr, right);
            }

            return(expr);
        }
 public object VisitCommaExpr(Expr.Comma expr)
 {
     Evaluate(expr.left);
     return(Evaluate(expr.right));
 }
示例#3
0
 public object VisitCommaExpr(Expr.Comma expr)
 {
     Resolve(expr.left);
     Resolve(expr.right);
     return(null);
 }
示例#4
0
 public string VisitCommaExpr(Expr.Comma expr)
 {
     return(Parenthesize("comma", expr.left, expr.right));
 }