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

Diff of /trunk/instrument-js.cpp

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

revision 376 by siliconforks, Tue Oct 28 05:30:23 2008 UTC revision 377 by siliconforks, Tue Oct 28 05:30:43 2008 UTC
# Line 655  Line 655 
655      instrument_expression(node->pn_kid, f);      instrument_expression(node->pn_kid, f);
656      break;      break;
657    case TOK_DOT:    case TOK_DOT:
658      /* numeric literals must be parenthesized */      /* numeric literals, object literals must be parenthesized */
659      if (node->pn_expr->pn_type == TOK_NUMBER) {      switch (node->pn_expr->pn_type) {
660        case TOK_NUMBER:
661        case TOK_RC:
662        Stream_write_char(f, '(');        Stream_write_char(f, '(');
663        instrument_expression(node->pn_expr, f);        instrument_expression(node->pn_expr, f);
664        Stream_write_char(f, ')');        Stream_write_char(f, ')');
665      }        break;
666      else {      default:
667        instrument_expression(node->pn_expr, f);        instrument_expression(node->pn_expr, f);
668          break;
669      }      }
670      /*      /*
671      This may have originally been x['foo-bar'].  Because the string 'foo-bar'      This may have originally been x['foo-bar'].  Because the string 'foo-bar'

Legend:
Removed from v.376  
changed lines
  Added in v.377

  ViewVC Help
Powered by ViewVC 1.1.24