Mercurial > hg > octave-lyh
changeset 772:05cd8c8b13b3
[project @ 1994-10-05 22:10:27 by jwe]
author | jwe |
---|---|
date | Wed, 05 Oct 1994 22:12:21 +0000 |
parents | e16a175a8bb5 |
children | dedc491ec606 |
files | src/pt-exp-base.cc src/pt-misc.cc |
diffstat | 2 files changed, 36 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-exp-base.cc +++ b/src/pt-exp-base.cc @@ -1379,9 +1379,9 @@ static char *op; switch (etype) { - case tree_expression::increment: op = "++"; break; - case tree_expression::decrement: op = "--"; break; - default: op = "unknown"; break; + case tree_expression::increment: op = "++"; break; + case tree_expression::decrement: op = "--"; break; + default: op = "<unknown>"; break; } return op; } @@ -1445,9 +1445,9 @@ static char *op; switch (etype) { - case tree_expression::increment: op = "++"; break; - case tree_expression::decrement: op = "--"; break; - default: op = "unknown"; break; + case tree_expression::increment: op = "++"; break; + case tree_expression::decrement: op = "--"; break; + default: op = "<unknown>"; break; } return op; } @@ -1528,11 +1528,11 @@ static char *op; switch (etype) { - case tree_expression::not: op = "!"; break; - case tree_expression::uminus: op = "-"; break; - case tree_expression::hermitian: op = "'"; break; - case tree_expression::transpose: op = ".'"; break; - default: op = "unknown"; break; + case tree_expression::not: op = "!"; break; + case tree_expression::uminus: op = "-"; break; + case tree_expression::hermitian: op = "'"; break; + case tree_expression::transpose: op = ".'"; break; + default: op = "<unknown>"; break; } return op; } @@ -1572,7 +1572,9 @@ os << oper (); break; default: - panic_impossible (); + os << oper (); + if (op) + op->print_code (os); break; } @@ -1705,27 +1707,27 @@ static char *op; switch (etype) { - case tree_expression::add: op = "+"; break; - case tree_expression::subtract: op = "-"; break; - case tree_expression::multiply: op = "*"; break; - case tree_expression::el_mul: op = ".*"; break; - case tree_expression::divide: op = "/"; break; - case tree_expression::el_div: op = "./"; break; - case tree_expression::leftdiv: op = "\\"; break; - case tree_expression::el_leftdiv: op = ".\\"; break; - case tree_expression::power: op = "^"; break; - case tree_expression::elem_pow: op = ".^"; break; - case tree_expression::cmp_lt: op = "<"; break; - case tree_expression::cmp_le: op = "<="; break; - case tree_expression::cmp_eq: op = "=="; break; - case tree_expression::cmp_ge: op = ">="; break; - case tree_expression::cmp_gt: op = ">"; break; - case tree_expression::cmp_ne: op = "!="; break; - case tree_expression::and_and: op = "&&"; break; - case tree_expression::or_or: op = "||"; break; - case tree_expression::and: op = "&"; break; - case tree_expression::or: op = "|"; break; - default: op = "unknown"; break; + case tree_expression::add: op = "+"; break; + case tree_expression::subtract: op = "-"; break; + case tree_expression::multiply: op = "*"; break; + case tree_expression::el_mul: op = ".*"; break; + case tree_expression::divide: op = "/"; break; + case tree_expression::el_div: op = "./"; break; + case tree_expression::leftdiv: op = "\\"; break; + case tree_expression::el_leftdiv: op = ".\\"; break; + case tree_expression::power: op = "^"; break; + case tree_expression::elem_pow: op = ".^"; break; + case tree_expression::cmp_lt: op = "<"; break; + case tree_expression::cmp_le: op = "<="; break; + case tree_expression::cmp_eq: op = "=="; break; + case tree_expression::cmp_ge: op = ">="; break; + case tree_expression::cmp_gt: op = ">"; break; + case tree_expression::cmp_ne: op = "!="; break; + case tree_expression::and_and: op = "&&"; break; + case tree_expression::or_or: op = "||"; break; + case tree_expression::and: op = "&"; break; + case tree_expression::or: op = "|"; break; + default: op = "<unknown>"; break; } return op; }