/[jscoverage]/trunk/instrument-js.c
ViewVC logotype

Diff of /trunk/instrument-js.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 373 by siliconforks, Mon Oct 27 20:36:44 2008 UTC revision 374 by siliconforks, Mon Oct 27 21:42:58 2008 UTC
# Line 468  Line 468 
468        }        }
469        break;        break;
470      case TOK_ASSIGN:      case TOK_ASSIGN:
471          /* destructuring */
472          instrument_expression(p->pn_left, f);
473          Stream_write_string(f, " = ");
474          instrument_expression(p->pn_right, f);
475          break;
476      case TOK_RB:      case TOK_RB:
477      case TOK_RC:      case TOK_RC:
478        /* destructuring */        /* destructuring */
# Line 507  Line 512 
512      }      }
513      break;      break;
514    case TOK_ASSIGN:    case TOK_ASSIGN:
515      instrument_expression(node->pn_left, f);      if (node->pn_left->pn_type == TOK_RC) {
516          /* destructuring assignment with object literal must be in parentheses */
517          Stream_write_char(f, '(');
518          instrument_expression(node->pn_left, f);
519          Stream_write_char(f, ')');
520        }
521        else {
522          instrument_expression(node->pn_left, f);
523        }
524      Stream_write_char(f, ' ');      Stream_write_char(f, ' ');
525      switch (node->pn_op) {      switch (node->pn_op) {
526      case JSOP_ADD:      case JSOP_ADD:

Legend:
Removed from v.373  
changed lines
  Added in v.374

  ViewVC Help
Powered by ViewVC 1.1.24