Mercurial > hg > octave-lojdl
changeset 7690:97e535ec65db
make_constant: stash original text for strings
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 03 Apr 2008 14:09:49 -0400 |
parents | a9d25da4ed9c |
children | 4a01572f4268 |
files | src/ChangeLog src/parse.y |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2008-04-03 John W. Eaton <jwe@octave.org> + * parse.y (make_constant): Also stash original text for strings. + * ov-fcn-handle.cc (octave_fcn_handle::subsref): Don't call next_subsref here.
--- a/src/parse.y +++ b/src/parse.y @@ -1697,8 +1697,12 @@ case DQ_STRING: case SQ_STRING: { - octave_value tmp (tok_val->text (), op == DQ_STRING ? '"' : '\''); + char delim = op == DQ_STRING ? '"' : '\''; + octave_value tmp (tok_val->text (), delim); retval = new tree_constant (tmp, l, c); + // FIXME -- maybe this should also be handled by + // tok_val->text_rep () for character strings? + retval->stash_original_text (delim + tok_val->text () + delim); } break;