Mercurial > hg > octave-nkf
changeset 5066:05e4d8c0a840
[project @ 2004-11-04 20:38:46 by jwe]
author | jwe |
---|---|
date | Thu, 04 Nov 2004 20:38:50 +0000 |
parents | 1312d3af9eb0 |
children | 50f9e343a3ff |
files | src/ChangeLog src/pt-colon.cc src/pt-colon.h |
diffstat | 3 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2004-11-04 John W. Eaton <jwe@octave.org> + * pt-colon.cc (tree_colon_expression::line, + tree_colon_expression::column): New functions. + * oct-stream.cc (octave_stream::seek (long, int)): Return error (but leave file position unchanged) for attempt to seek beyond end of file.
--- a/src/pt-colon.cc +++ b/src/pt-colon.cc @@ -168,6 +168,24 @@ line (), column ()); } +int +tree_colon_expression::line (void) const +{ + return (op_base ? op_base->line () + : (op_inc ? op_inc->line () + : (op_limit ? op_limit->line () + : -1))); +} + +int +tree_colon_expression::column (void) const +{ + return (op_base ? op_base->column () + : (op_inc ? op_inc->column () + : (op_limit ? op_limit->column () + : -1))); +} + void tree_colon_expression::accept (tree_walker& tw) {