Beispiel #1
0
 virtual public void assignment_expression(assignment_expression ast, int parent)
 {
     //        int myprec = prec("=");
     //        if (myprec <= parent)
     //            parenexpr(ast);
     //        else {
     //            visit(ast.e1, myprec);
     //            Write(" = ");
     //            visit(ast.e2, myprec);
     //        }
 }
Beispiel #2
0
    virtual public void assignment_expression(assignment_expression ast, int parent)
    {
        int myprec = prec("=");

        if (myprec <= parent)
        {
            parenexpr(ast);
        }
        else
        {
            visit(ast.e1, myprec);
            Write(" = ");
            visit(ast.e2, myprec);
        }
    }
Beispiel #3
0
 public virtual expression assignment_expression(assignment_expression ast, int lvalue, int rvalue)
 {
     ast.e1 = expression(ast.e1, 1, 0);
     ast.e2 = expression(ast.e2, 0, ast.valueUsed ? 2 : 1);
     return(wrap(ast, ast.valueUsed ? 2 : 1));
 }