From e2afc783db0dff1927b00dc506390353d9e3bbd2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 29 Feb 2012 22:32:23 -0600 Subject: Increased file copyrights to 2012 --- src/token.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/token.cc') diff --git a/src/token.cc b/src/token.cc index 77092d49..9449d9b7 100644 --- a/src/token.cc +++ b/src/token.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2010, John Wiegley. All rights reserved. + * Copyright (c) 2003-2012, John Wiegley. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are -- cgit v1.2.3 From 8b9b9e9e723cc24a030f0cb5ae101d0978a0aa81 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 2 Mar 2012 10:18:42 -0600 Subject: Removed an old comment --- src/token.cc | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/token.cc') diff --git a/src/token.cc b/src/token.cc index 9449d9b7..57b97eca 100644 --- a/src/token.cc +++ b/src/token.cc @@ -415,9 +415,6 @@ void expr_t::token_t::next(std::istream& in, const parse_flags_t& pflags) try { amount_t temp; if (! temp.parse(in, parse_flags.plus_flags(PARSE_SOFT_FAIL))) { - // If the amount had no commodity, it must be an unambiguous - // variable reference - in.clear(); in.seekg(pos, std::ios::beg); if (in.fail()) -- cgit v1.2.3 From 90029d9925f2662c655d72fab1f46ee343765ba7 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 7 Mar 2012 10:33:46 -0600 Subject: Allow identifier names to begin with _ --- src/token.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/token.cc') diff --git a/src/token.cc b/src/token.cc index 57b97eca..e5d6b218 100644 --- a/src/token.cc +++ b/src/token.cc @@ -421,7 +421,7 @@ void expr_t::token_t::next(std::istream& in, const parse_flags_t& pflags) throw_(parse_error, _("Failed to reset input stream")); c = static_cast(in.peek()); - if (! std::isalpha(c)) + if (! std::isalpha(c) && c != '_') expected('\0', c); parse_ident(in); -- cgit v1.2.3