ENH: code simplification, improvements for reading dictionary variables

- Now accept '/' when reading variables without requiring
  a surrounding '{}'

- fix some degenerate parsing cases when the first character is
  already bad.

  Eg, $"abc" would have previously parsed as a <$"> variable, even
  although a double quote is not a valid variable character.

  Now emits a warning and parses as a '$' token and a string token.
This commit is contained in:
Mark Olesen
2019-10-08 18:43:38 +02:00
committed by Andrew Heather
parent f164292e89
commit 6b5492e3bd
7 changed files with 169 additions and 134 deletions

View File

@ -277,7 +277,9 @@ namespace
//
// Similar to word::valid(), except we don't have the benefit of a parser
// to filter out other unacceptable entries for us.
//
// Does not currently accept '/' in a variable name.
// We would like "$file/$name" to expand as two variables.
static inline bool validVariableChar(char c)
{
return