From 35713fe79b767de79a44e3925db3536bc750c214 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 23 Jan 2023 15:42:25 -0800 Subject: Disallow numbers in function names --- NEWS.md | 2 ++ src/token.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index ac407e11..e2cc44ca 100644 --- a/NEWS.md +++ b/NEWS.md @@ -44,6 +44,8 @@ to include for stdin (`-f -`). Also for `-f -` when `include` cannot find the file it reports the error with full path now. (bug #2057 & bug #2092) +- Numbers are no longer permitted in value expression function names. + - Various documentation improvements ## 3.2.1 (2020-05-18) diff --git a/src/token.cc b/src/token.cc index 01ee2a18..148fbb10 100644 --- a/src/token.cc +++ b/src/token.cc @@ -133,7 +133,7 @@ void expr_t::token_t::parse_ident(std::istream& in) int c; char buf[256]; - READ_INTO_(in, buf, 255, c, length, std::isalnum(c) || c == '_'); + READ_INTO_(in, buf, 255, c, length, std::isalpha(c) || c == '_'); value.set_string(buf); } -- cgit v1.2.3