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 */ |
659 |
|
if (node->pn_expr->pn_type == TOK_NUMBER) { |
660 |
|
Stream_write_char(f, '('); |
661 |
|
instrument_expression(node->pn_expr, f); |
662 |
|
Stream_write_char(f, ')'); |
663 |
|
} |
664 |
|
else { |
665 |
|
instrument_expression(node->pn_expr, f); |
666 |
|
} |
667 |
/* |
/* |
668 |
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' |
669 |
contains illegal characters, we have to use the subscript syntax instead of |
contains illegal characters, we have to use the subscript syntax instead of |
670 |
the dot syntax. |
the dot syntax. |
671 |
*/ |
*/ |
|
instrument_expression(node->pn_expr, f); |
|
672 |
assert(ATOM_IS_STRING(node->pn_atom)); |
assert(ATOM_IS_STRING(node->pn_atom)); |
673 |
{ |
{ |
674 |
JSString * s = ATOM_TO_STRING(node->pn_atom); |
JSString * s = ATOM_TO_STRING(node->pn_atom); |