Mercurial > hg > octave-lojdl
changeset 10502:f13bf183a003
isvarname: keywords are not valid variable names
author | Judd Storrs <jstorrs@gmail.com> |
---|---|
date | Fri, 09 Apr 2010 09:54:19 -0400 |
parents | cbf6eebb2a0b |
children | fcf6341a8cab |
files | src/ChangeLog src/utils.cc |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-04-09 Judd Storrs <jstorrs@gmail.com> + + * utils.cc (isvarname): Keywords are not valid variable names. + 2010-04-08 Jaroslav Hajek <highegg@gmail.com> * help.cc (make_name_list): Don't insert global and top-level scope
--- a/src/utils.cc +++ b/src/utils.cc @@ -54,6 +54,7 @@ #include "error.h" #include "gripes.h" #include "input.h" +#include "lex.h" #include "load-path.h" #include "oct-errno.h" #include "oct-hist.h" @@ -102,7 +103,7 @@ return retval; if (argc == 2) - retval = valid_identifier (argv[1]); + retval = valid_identifier (argv[1]) && ! is_keyword (argv[1]); else print_usage ();